version:1.5.0714

bugfixes:
add:增加浏览器下载开关,去掉易学派应用后台结束进程
This commit is contained in:
2025-07-14 15:02:00 +08:00
parent 2e2eae508a
commit 81e4f050ca
6 changed files with 85 additions and 40 deletions

View File

@@ -73,6 +73,7 @@ public class SysSettingUtils {
setNotification(context, jsonObject);
setPanelShow(context, jsonObject);
setDisAllowCamera(context, jsonObject);
}
/**
@@ -358,7 +359,9 @@ public class SysSettingUtils {
}
JgyUtils.getInstance().setBluetoothEnable(state == 0);
AllwinnerCubeMdmManager.getInstance().setBluetoothEnable(state == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setBluetoothEnable(state == 0);
}
}
/**
@@ -461,8 +464,9 @@ public class SysSettingUtils {
}
JgyUtils.getInstance().setBluetoothEnable(setting_bht == 0);
AllwinnerCubeMdmManager.getInstance().setBluetoothEnable(setting_bht == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setBluetoothEnable(setting_bht == 0);
}
}
private static void setHotspot(Context context, int state) {
@@ -474,7 +478,9 @@ public class SysSettingUtils {
boolean aole_hotspot_forbid_on = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HOTSPOT_FORBID_ON, state);
Log.e(TAG, "aole_hotspot_forbid_on:" + aole_hotspot_forbid_on);
AllwinnerCubeMdmManager.getInstance().setWifiHotSpotStatus(state);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setWifiHotSpotStatus(state);
}
} catch (Exception e) {
Log.e(TAG, "setHotspot: " + e.getMessage());
}
@@ -493,7 +499,9 @@ public class SysSettingUtils {
Log.e(TAG, "aole_hotspot_forbid_on---------" + setting_hotspot);
Log.e(TAG, "aole_hotspot_forbid_on---------" + aole_hotspot_forbid_on);
AllwinnerCubeMdmManager.getInstance().setWifiHotSpotStatus(setting_hotspot);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setWifiHotSpotStatus(setting_hotspot);
}
} catch (Exception e) {
Log.e(TAG, "setHotspot: " + e.getMessage());
}
@@ -566,7 +574,9 @@ public class SysSettingUtils {
Intent navIntent = new Intent(navigationStatus);
context.sendBroadcast(navIntent);
AllwinnerCubeMdmManager.getInstance().setNavigationStatus(setting_navigation == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setNavigationStatus(setting_navigation == 0);
}
//状态栏显示开关
int setting_statusbar = changeNum(jsonObject.get("setting_statusbar").getAsInt());
@@ -592,7 +602,9 @@ public class SysSettingUtils {
context.sendBroadcast(statusIntent);
// }
AllwinnerCubeMdmManager.getInstance().setStatusBarEnable(setting_statusbar == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setStatusBarEnable(setting_statusbar == 0);
}
}
private static void setCamera(Context context, int state) {
@@ -645,7 +657,9 @@ public class SysSettingUtils {
private static void setTF(Context context, int state) {
//存储卡
AllwinnerCubeMdmManager.getInstance().setSDEnable(state == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setSDEnable(state == 0);
}
JgyUtils.getInstance().setSDOTGEnable(state == 0);
boolean aole_sdcard_forbid_on = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, state);
@@ -685,7 +699,9 @@ public class SysSettingUtils {
private static void setTF(Context context, JsonObject jsonObject) {
//存储卡
int setting_memory = changeNum(jsonObject.get("setting_memory").getAsInt());
AllwinnerCubeMdmManager.getInstance().setSDEnable(setting_memory == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setSDEnable(setting_memory == 0);
}
Log.e(TAG, "setTF: setting_memory = " + setting_memory);
JgyUtils.getInstance().setSDOTGEnable(setting_memory == 0);
@@ -750,7 +766,9 @@ public class SysSettingUtils {
Log.e(TAG, "setCanReset: state = " + state);
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, state);
//默认打开
AllwinnerCubeMdmManager.getInstance().setResetFactoryEnable(state == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setResetFactoryEnable(state == 0);
}
}
//aole_restore_forbid_on=1禁止恢复出厂设置
@@ -763,8 +781,9 @@ public class SysSettingUtils {
} else {
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, 1);
}
AllwinnerCubeMdmManager.getInstance().setResetFactoryEnable(mode == 1);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setResetFactoryEnable(mode == 1);
}
}
//系统默认“使用网络提供时间”且不可点击
@@ -862,12 +881,14 @@ public class SysSettingUtils {
mStatusBarManager.disable(StatusBarManager.DISABLE_NONE);//显示隐藏的虚拟按键
}
/**
* 设置浏览器禁止输入
*
* @param context
* @param jsonObject
*/
// TODO: 2025/7/14 待优化,逻辑太差了
private static void setBrowserInput(Context context, JsonObject jsonObject) {
int state = 1;
try {
@@ -888,17 +909,15 @@ public class SysSettingUtils {
Settings.System.putInt(context.getContentResolver(), "qch_Browser_input", 0);
}
try {
int is_browser_network;
if (TextUtils.isEmpty(jsonObject.get("is_browser_network").getAsString())) {
is_browser_network = 0;
} else {
is_browser_network = jsonObject.get("is_browser_network").getAsInt();
}
if (jsonObject.get("is_browser_network") != null) {
int is_browser_network = jsonObject.get("is_browser_network").getAsInt();
Log.e(TAG, "setBrowserInput: is_browser_network = " + is_browser_network);
Settings.Global.putInt(context.getContentResolver(), "is_browser_network", is_browser_network);
} catch (Exception e) {
Log.e(TAG, "setBrowserInput: e: " + e.getMessage());
}
if (jsonObject.get("browser_down") != null) {
int browser_down = jsonObject.get("browser_down").getAsInt();
Settings.System.putInt(context.getContentResolver(), "aoleyun_browser_down", browser_down);
}
}
@@ -911,6 +930,7 @@ public class SysSettingUtils {
private static void setBrowserInput(Context context, int state) {
Settings.System.putInt(context.getContentResolver(), "qch_Browser_input", 0);
Settings.Global.putInt(context.getContentResolver(), "is_browser_network", changeNum(state));
Settings.System.putInt(context.getContentResolver(), "aoleyun_browser_down", state);
}
private static void setAdminApp(Context context, JsonObject jsonObject) {
@@ -919,7 +939,9 @@ public class SysSettingUtils {
int is_app_install = appInstall.getAsInt();
Log.e(TAG, "setAdminApp: is_app_install = " + is_app_install);
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_APP_ALLOW_INSTALL, is_app_install);
AllwinnerCubeMdmManager.getInstance().setInstallPackageEnable(is_app_install == 1);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setInstallPackageEnable(is_app_install == 1);
}
} else {
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_APP_ALLOW_INSTALL, 0);
}
@@ -945,7 +967,9 @@ public class SysSettingUtils {
private static void setAdminApp(Context context, int state) {
Log.e(TAG, "setAdminApp: state = " + state);
AllwinnerCubeMdmManager.getInstance().setInstallPackageEnable(state == 0);
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setInstallPackageEnable(state == 0);
}
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_APP_ALLOW_INSTALL, changeNum(state));
Settings.Global.putInt(context.getContentResolver(), "is_admin_app", changeNum(state));
}