build: add 6789U platform
This commit is contained in:
@@ -112,7 +112,7 @@ public class SysSettingUtils {
|
||||
setSystemAppDisable(context, 0);
|
||||
setNotification(context, 0);
|
||||
setSettingsMenuShow(context);
|
||||
setEyeProtectionModeEntrance(context, 0);
|
||||
setEyeProtectionModeEntrance(context, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1386,6 +1386,10 @@ public class SysSettingUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param context
|
||||
* @param status
|
||||
*/
|
||||
private static void setEyeProtectionModeEntrance(Context context, int status) {
|
||||
Log.e(TAG, "setEyeProtectionModeEntrance: status = " + status);
|
||||
if (status == 0) {
|
||||
@@ -1400,8 +1404,12 @@ public class SysSettingUtils {
|
||||
|
||||
PackageManager pm = context.getPackageManager();
|
||||
ComponentName componentName = new ComponentName(context, EyeProtectionActivity.class);
|
||||
if (pm.getComponentEnabledSetting(componentName) == componentState) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
pm.setComponentEnabledSetting(componentName, componentState, PackageManager.DONT_KILL_APP);
|
||||
new CacheUtils().cleanApplicationUserData(context, "com.aoleyun.os");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "setComponentEnabledSetting: " + e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user