Loading packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +9 −0 Original line number Diff line number Diff line Loading @@ -1647,6 +1647,15 @@ public class SettingsProvider extends ContentProvider { restriction = UserManager.DISALLOW_AIRPLANE_MODE; break; case Settings.Secure.DOZE_ENABLED: case Settings.Secure.DOZE_ALWAYS_ON: case Settings.Secure.DOZE_PULSE_ON_PICK_UP: case Settings.Secure.DOZE_PULSE_ON_LONG_PRESS: case Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP: if ("0".equals(value)) return false; restriction = UserManager.DISALLOW_AMBIENT_DISPLAY; break; default: if (setting != null && setting.startsWith(Settings.Global.DATA_ROAMING)) { if ("0".equals(value)) return false; Loading services/core/java/com/android/server/pm/UserRestrictionsUtils.java +19 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,25 @@ public class UserRestrictionsUtils { } } break; case UserManager.DISALLOW_AMBIENT_DISPLAY: if (newValue) { android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_ENABLED, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_ALWAYS_ON, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_PULSE_ON_PICK_UP, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP, "0"); } break; } } finally { Binder.restoreCallingIdentity(id); Loading Loading
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +9 −0 Original line number Diff line number Diff line Loading @@ -1647,6 +1647,15 @@ public class SettingsProvider extends ContentProvider { restriction = UserManager.DISALLOW_AIRPLANE_MODE; break; case Settings.Secure.DOZE_ENABLED: case Settings.Secure.DOZE_ALWAYS_ON: case Settings.Secure.DOZE_PULSE_ON_PICK_UP: case Settings.Secure.DOZE_PULSE_ON_LONG_PRESS: case Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP: if ("0".equals(value)) return false; restriction = UserManager.DISALLOW_AMBIENT_DISPLAY; break; default: if (setting != null && setting.startsWith(Settings.Global.DATA_ROAMING)) { if ("0".equals(value)) return false; Loading
services/core/java/com/android/server/pm/UserRestrictionsUtils.java +19 −0 Original line number Diff line number Diff line Loading @@ -561,6 +561,25 @@ public class UserRestrictionsUtils { } } break; case UserManager.DISALLOW_AMBIENT_DISPLAY: if (newValue) { android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_ENABLED, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_ALWAYS_ON, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_PULSE_ON_PICK_UP, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, "0"); android.provider.Settings.Secure.putString( context.getContentResolver(), Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP, "0"); } break; } } finally { Binder.restoreCallingIdentity(id); Loading