version:1.6.0226
bugfixes: add:增加g128t平台,修复开发者问题
This commit is contained in:
@@ -73,6 +73,7 @@ public class SysSettingUtils {
|
||||
setNotification(context, jsonObject);
|
||||
setPanelShow(context, jsonObject);
|
||||
setDisAllowCamera(context, jsonObject);
|
||||
setSettingsMenuShow(context, jsonObject);
|
||||
|
||||
}
|
||||
|
||||
@@ -100,7 +101,7 @@ public class SysSettingUtils {
|
||||
setWallpaper(context, 0);
|
||||
setCanReset(context, 0);
|
||||
setAutoTime(context, 1);
|
||||
setBrowserInput(context, 1);
|
||||
setBrowserInput(context, 0);
|
||||
if (!BuildConfig.DEBUG) {
|
||||
// JgyUtils.getInstance().setDeveloperOptions(0);
|
||||
}
|
||||
@@ -108,6 +109,8 @@ public class SysSettingUtils {
|
||||
setAdminApp(context, 1);
|
||||
setSystemAppDisable(context, 0);
|
||||
setNotification(context, 0);
|
||||
setSettingsMenuShow(context);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,7 +133,7 @@ public class SysSettingUtils {
|
||||
setWallpaper(context, 0);
|
||||
setCanReset(context, 0);
|
||||
setAutoTime(context, 0);
|
||||
setBrowserInput(context, 0);
|
||||
setBrowserInput(context, 1);
|
||||
// JgyUtils.getInstance().setDeveloperOptions(1);
|
||||
setStatusBar(context, 0);
|
||||
setAdminApp(context, 0);
|
||||
@@ -1257,6 +1260,105 @@ public class SysSettingUtils {
|
||||
Log.e("setDisAllowCamera", "setDisAllowCamera: " + camera_ctrl);
|
||||
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_DISALLOW_CAMERA, changeNum(camera_ctrl));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param context
|
||||
* @param jsonObject key的定义为:”wlan”:网络和互联网,”connected_devices”:已连接的设备,”apps”:应用,”notifications”:通知,”display”:显示,
|
||||
* ”sound”:提示音,”storage”:存储,”battery”:电池,”wallpaper”:壁纸,”location”:位置信息,”system”:系统,”about”:关于。
|
||||
*/
|
||||
private static void setSettingsMenuShow(Context context, JsonObject jsonObject) {
|
||||
List<String> menus = new ArrayList<>();
|
||||
// OTA升级管控 (默认允许)
|
||||
int ota_upgrade_control = jsonObject.get("ota_upgrade_control").getAsInt();
|
||||
if (ota_upgrade_control == 0) {
|
||||
menus.add("system_updates");
|
||||
}
|
||||
// 生物识别和密码 (默认允许)
|
||||
int biometric_and_password = jsonObject.get("biometric_and_password").getAsInt();
|
||||
if (biometric_and_password == 0) {
|
||||
menus.add("biometrics_password");
|
||||
}
|
||||
// 省电模式 (默认允许)
|
||||
int power_saving_mode = jsonObject.get("power_saving_mode").getAsInt();
|
||||
if (power_saving_mode == 0) {
|
||||
menus.add("battery");
|
||||
}
|
||||
// 安全 (默认允许)
|
||||
int security = jsonObject.get("security").getAsInt();
|
||||
if (security == 0) {
|
||||
menus.add("security");
|
||||
}
|
||||
// 大屏特色功能 (默认允许)
|
||||
int large_screen_features = jsonObject.get("large_screen_features").getAsInt();
|
||||
if (large_screen_features == 0) {
|
||||
// menus.add("");
|
||||
}
|
||||
// 辅助功能 (默认允许)
|
||||
int accessibility = jsonObject.get("accessibility").getAsInt();
|
||||
if (accessibility == 0) {
|
||||
menus.add("accessibility");
|
||||
}
|
||||
// 隐私 (默认允许)
|
||||
int privacy = jsonObject.get("privacy").getAsInt();
|
||||
if (privacy == 0) {
|
||||
menus.add("privacy");
|
||||
}
|
||||
// 更多链接 (默认允许)
|
||||
int more_links = jsonObject.get("more_links").getAsInt();
|
||||
if (more_links == 0) {
|
||||
menus.add("more_connections");
|
||||
}
|
||||
// 通知和状态栏 (默认允许)
|
||||
int notification_and_status_bar = jsonObject.get("notification_and_status_bar").getAsInt();
|
||||
if (notification_and_status_bar == 0) {
|
||||
menus.add("notifications");
|
||||
}
|
||||
// 应用管理 (默认允许)
|
||||
int app_management_general = jsonObject.get("app_management_general").getAsInt();
|
||||
if (app_management_general == 0) {
|
||||
menus.add("apps");
|
||||
}
|
||||
// 荣耀账号登录 (默认禁止)
|
||||
int honor_account_login = jsonObject.get("honor_account_login").getAsInt();
|
||||
if (honor_account_login == 0) {
|
||||
menus.add("honor_id");
|
||||
}
|
||||
// 智慧互联 (默认禁止)
|
||||
int smart_interconnect = jsonObject.get("smart_interconnect").getAsInt();
|
||||
if (smart_interconnect == 0) {
|
||||
menus.add("super_device");
|
||||
}
|
||||
// VPN管控 (默认禁止)
|
||||
int vpn_control = jsonObject.get("vpn_control").getAsInt();
|
||||
if (vpn_control == 0) {
|
||||
menus.add("vpn_settings");
|
||||
}
|
||||
// 默认应用 (默认禁止)
|
||||
int default_applications = jsonObject.get("default_applications").getAsInt();
|
||||
if (default_applications == 0) {
|
||||
// menus.add("");
|
||||
}
|
||||
// 应用分身 (默认禁止)
|
||||
int app_cloning = jsonObject.get("app_cloning").getAsInt();
|
||||
if (app_cloning == 0) {
|
||||
menus.add("apps_clone");
|
||||
}
|
||||
// 应用启动管理 (默认禁止)
|
||||
int app_startup_management = jsonObject.get("app_startup_management").getAsInt();
|
||||
if (app_startup_management == 0) {
|
||||
menus.add("apps_startup_management");
|
||||
}
|
||||
// 应用管理 (默认禁止)
|
||||
int app_management_control = jsonObject.get("app_management_control").getAsInt();
|
||||
if (app_management_control == 0) {
|
||||
menus.add("apps_management");
|
||||
menus.add("apps_honor_tips");
|
||||
}
|
||||
// Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, String.join(",", menus));
|
||||
}
|
||||
|
||||
private static void setSettingsMenuShow(Context context) {
|
||||
// Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_SETTINGS_DISALLOW, "");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user