1.4.0529 第一次联网打开默认桌面,默认桌面不允许退出

This commit is contained in:
2024-05-30 10:31:55 +08:00
parent 2f8a9e6f07
commit 7a07105d15
6 changed files with 41 additions and 27 deletions

View File

@@ -648,8 +648,8 @@ public class SysSettingUtils {
}
private static void setCanReset(Context context, int state) {
boolean aole_restore_forbid_on = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, state);
Log.e(TAG, "aole_restore_forbid_on: " + aole_restore_forbid_on);
Log.e(TAG, "setCanReset: state = " + state);
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, state);
//默认打开
}
@@ -657,12 +657,11 @@ public class SysSettingUtils {
//aole_restore_forbid_on=0允许恢复出厂设置
private static void setCanReset(Context context, JsonObject jsonObject) {
int mode = jsonObject.get("qch_restore").getAsInt();
Log.e(TAG, "setCanReset: mode = " + mode);
if (mode == 1) {
boolean aole_restore_forbid_on = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, 0);
Log.e(TAG, "aole_restore_forbid_on: " + aole_restore_forbid_on);
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, 0);
} else {
boolean aole_restore_forbid_on = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, 1);
Log.e(TAG, "aole_restore_forbid_on: " + aole_restore_forbid_on);
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, 1);
}
}