Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
throw JSONException
  • Loading branch information
GreenMushroomNew committed Jun 17, 2021
1 parent 2dab0c8 commit 87cdb32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
minSdkVersion 23
targetSdkVersion 30
versionCode 13
versionName "2.6-beta"
versionName "2.6"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled false

Expand Down
21 changes: 8 additions & 13 deletions app/src/main/java/gm/tieba/tabswitch/dao/Adp.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.util.Set;

import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.BaseHooker;

Expand Down Expand Up @@ -76,7 +75,7 @@ public void beforeHookedMethod(MethodHookParam param) throws Throwable {
});
}

public synchronized Adp parseDatabase() {
public synchronized Adp parseDatabase() throws JSONException {
String myPagesTable = null;
mDb = getContext().openOrCreateDatabase("baidu_adp.db", Context.MODE_PRIVATE,
null);
Expand All @@ -94,20 +93,16 @@ public synchronized Adp parseDatabase() {
return this;
}

private void parseMyPages(String tableName) {
private void parseMyPages(String tableName) throws JSONException {
Cursor c = mDb.query(tableName, null, null, null, null, null, null);
c.moveToNext();
String mValue = c.getString(4);
try {
JSONObject jsonObject = new JSONObject(mValue);
JSONArray followList = jsonObject.optJSONArray("follow_list");
for (int i = 0; i < followList.length(); i++) {
JSONObject follow = followList.optJSONObject(i);
String name = follow.getString("name_show");
follows.add(name);
}
} catch (JSONException e) {
XposedBridge.log(e);
JSONObject jsonObject = new JSONObject(mValue);
JSONArray followList = jsonObject.optJSONArray("follow_list");
for (int i = 0; i < followList.length(); i++) {
JSONObject follow = followList.optJSONObject(i);
String name = follow.getString("name_show");
follows.add(name);
}
c.close();
}
Expand Down

0 comments on commit 87cdb32

Please sign in to comment.