Skip to content

Commit

Permalink
要是让你们直接反编译就能看到我的 ApiKeys 那多没意思。。。
Browse files Browse the repository at this point in the history
修复 Nav 中头像不会自动改变的 BUG
  • Loading branch information
haruue committed Feb 14, 2016
1 parent 55e2b95 commit 12d13eb
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
.DS_Store
/build
/captures
/app/src/main/java/cn/com/caoyue/bihu/data/network/ApiKeys.java
/app/src/main/jni/main.cpp
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ Web端使用的是朱大的[know_web](https://github.com/Jude95/know_web.git)的
+ 查看、提交答案
+ 更换头像

<!--
## 下载
[下载APK](app/app-release.apk)
-->
[下载APK](app/app-release.apk?raw=true)

## Developed by
Haruue Icymoon <[email protected]>
Expand Down
Binary file added app/app-release.apk
Binary file not shown.
5 changes: 5 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ android {
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
moduleName "JniApiKeys"
ldLibs "log", "z", "m"
abiFilters "armeabi", "armeabi-v7a", "x86"
}
}
buildTypes {
release {
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/java/cn/com/caoyue/bihu/data/network/ApiKeys.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package cn.com.caoyue.bihu.data.network;

public class ApiKeys {

static {
System.loadLibrary("JniApiKeys");
}

public static final String HARUUE_KNOW_WEB_APIKEY = getHaruueKnowWebApikey();
public static final String HARUUE_STORAGE_SERVER_2_APIKEY = getHaruueStorageServer2Apikey();

public static native String getHaruueKnowWebApikey();
public static native String getHaruueStorageServer2Apikey();

}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void run() {
JActivityManager.getInstance().closeAllActivity();
MainActivity.actionStart(LaunchPageActivity.this);
}
}, 2000);
}, 1500);
}

private class Listener implements View.OnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
import com.jude.utils.JActivityManager;
import com.jude.utils.JUtils;

import java.util.Objects;

import cn.com.caoyue.bihu.BuildConfig;
import cn.com.caoyue.bihu.R;
import cn.com.caoyue.bihu.data.provider.QuestionListProvider;
import cn.com.caoyue.bihu.data.storage.CurrentFragment;
import cn.com.caoyue.bihu.data.storage.CurrentQuestion;
import cn.com.caoyue.bihu.data.storage.CurrentUser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
Expand Down Expand Up @@ -43,6 +44,7 @@ public class ModifyFaceActivity extends AppCompatActivity {
Bitmap selectImageBitmap;
boolean isChangeFace = false;
public final static int REQUEST_CODE = 142;
Handler handler = new Handler();

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Expand Down Expand Up @@ -155,7 +157,12 @@ public void onResponse(Response<InformationTransfer> response) {
// 更新本地缓存
CurrentUser.getInstance().face = url;
JUtils.Toast(getResources().getString(R.string.modify_face_success));
finish();
handler.postDelayed(new Runnable() {
@Override
public void run() {
onBackPressed();
}
}, 500);
} else {
try {
JUtils.Log("inModifyFace_upload_failed1", "HTTP CODE " + response.code() + " Body: " + response.errorBody().string());
Expand Down
29 changes: 29 additions & 0 deletions app/src/main/jni/cn_com_caoyue_bihu_data_network_ApiKeys.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
#Fri Jan 22 17:39:33 CST 2016
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080

android.useDeprecatedNdk=true

0 comments on commit 12d13eb

Please sign in to comment.