version:2.1.2

update:debug模式下不管控开发人员选项
fix:修改和删除主页时浏览器黑白名单更新不及时
add:
This commit is contained in:
2021-06-11 10:09:41 +08:00
parent 9a1b5ece77
commit 26ab77e885
4 changed files with 19 additions and 12 deletions

View File

@@ -1386,7 +1386,9 @@ public class MainPresenter implements MainContact.Presenter {
SysSettingUtils.setDisableSetting(mContext);
SPUtils.put(mContext, "SystemSettingData", "");
//获取系统管控先不要关闭开发人员选项
Settings.System.putInt(mContext.getContentResolver(), "qch_Developeroptions", 1);
if (!BuildConfig.DEBUG) {
Settings.System.putInt(mContext.getContentResolver(), "qch_Developeroptions", 1);
}
}
} catch (IOException e) {
e.printStackTrace();
@@ -1437,9 +1439,11 @@ public class MainPresenter implements MainContact.Presenter {
@Override
public void onError(Throwable e) {
Log.e("getDeveloper", "onError: " + e.getMessage());
int oldStatus = Settings.System.getInt(mContext.getContentResolver(), "qch_Developeroptions", 1);
Log.e("getDeveloper", "oldStatus: " + oldStatus);
JGYUtils.getInstance().setDeveloperOptions(oldStatus);
if (!BuildConfig.DEBUG) {
int oldStatus = Settings.System.getInt(mContext.getContentResolver(), "qch_Developeroptions", 1);
Log.e("getDeveloper", "oldStatus: " + oldStatus);
JGYUtils.getInstance().setDeveloperOptions(oldStatus);
}
onComplete();
}

View File

@@ -929,7 +929,7 @@ public class HTTPInterface {
if (callback != null)
callback.onComplete();
Log.e("getHomePageBookmarks", "onComplete: ");
setBrowserBlackList(context);
}
});
}

View File

@@ -851,13 +851,16 @@ public class JGYUtils {
}
public void setDeveloperOptions(int state) {
Settings.System.putInt(mContext.getContentResolver(), "qch_Developeroptions", state);
if (state == 1) {
Intent intent = new Intent();
intent.setAction("qch_developeroptions_close");
intent.setPackage("com.android.settings");
mContext.sendBroadcast(intent);
if (!BuildConfig.DEBUG) {
Settings.System.putInt(mContext.getContentResolver(), "qch_Developeroptions", state);
if (state == 1) {
Intent intent = new Intent();
intent.setAction("qch_developeroptions_close");
intent.setPackage("com.android.settings");
mContext.sendBroadcast(intent);
}
}
}
public void hookWebView() {