Loading core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -6540,6 +6540,12 @@ public final class Settings { */ public static final String DOZE_PULSE_ON_PICK_UP = "doze_pulse_on_pick_up"; /** * Whether the device should pulse on long press gesture. * @hide */ public static final String DOZE_PULSE_ON_LONG_PRESS = "doze_pulse_on_long_press"; /** * Whether the device should pulse on double tap gesture. * @hide Loading core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java +14 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public class AmbientDisplayConfiguration { return pulseOnNotificationEnabled(user) || pulseOnPickupEnabled(user) || pulseOnDoubleTapEnabled(user) || pulseOnLongPressEnabled(user) || alwaysOnEnabled(user); } Loading Loading @@ -79,6 +80,19 @@ public class AmbientDisplayConfiguration { return mContext.getResources().getString(R.string.config_dozeDoubleTapSensorType); } public String longPressSensorType() { return mContext.getResources().getString(R.string.config_dozeLongPressSensorType); } public boolean pulseOnLongPressEnabled(int user) { return pulseOnLongPressAvailable() && boolSettingDefaultOff( Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, user); } private boolean pulseOnLongPressAvailable() { return !TextUtils.isEmpty(longPressSensorType()); } public boolean alwaysOnEnabled(int user) { return boolSettingDefaultOn(Settings.Secure.DOZE_ALWAYS_ON, user) && alwaysOnAvailable(); Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1884,6 +1884,9 @@ <!-- Type of the double tap sensor. Empty if double tap is not supported. --> <string name="config_dozeDoubleTapSensorType" translatable="false"></string> <!-- Type of the long press sensor. Empty if long press is not supported. --> <string name="config_dozeLongPressSensorType" translatable="false"></string> <!-- Control whether the always on display mode is available. This should only be enabled on devices where the display has be tuned to be power efficient in DOZE and/or DOZE_SUSPEND states. --> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3034,6 +3034,8 @@ <java-symbol type="array" name="config_hideWhenDisabled_packageNames" /> <java-symbol type="string" name="config_dozeLongPressSensorType" /> <java-symbol type="array" name="config_allowedGlobalInstantAppSettings" /> <java-symbol type="array" name="config_allowedSystemInstantAppSettings" /> <java-symbol type="array" name="config_allowedSecureInstantAppSettings" /> Loading core/tests/coretests/src/android/provider/SettingsBackupTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,7 @@ public class SettingsBackupTest { Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS, Settings.Secure.DISPLAY_DENSITY_FORCED, Settings.Secure.DOZE_ALWAYS_ON, Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, Settings.Secure.EMERGENCY_ASSISTANCE_APPLICATION, Settings.Secure.ENABLED_NOTIFICATION_ASSISTANT, Settings.Secure.ENABLED_NOTIFICATION_LISTENERS, Loading Loading
core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -6540,6 +6540,12 @@ public final class Settings { */ public static final String DOZE_PULSE_ON_PICK_UP = "doze_pulse_on_pick_up"; /** * Whether the device should pulse on long press gesture. * @hide */ public static final String DOZE_PULSE_ON_LONG_PRESS = "doze_pulse_on_long_press"; /** * Whether the device should pulse on double tap gesture. * @hide Loading
core/java/com/android/internal/hardware/AmbientDisplayConfiguration.java +14 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public class AmbientDisplayConfiguration { return pulseOnNotificationEnabled(user) || pulseOnPickupEnabled(user) || pulseOnDoubleTapEnabled(user) || pulseOnLongPressEnabled(user) || alwaysOnEnabled(user); } Loading Loading @@ -79,6 +80,19 @@ public class AmbientDisplayConfiguration { return mContext.getResources().getString(R.string.config_dozeDoubleTapSensorType); } public String longPressSensorType() { return mContext.getResources().getString(R.string.config_dozeLongPressSensorType); } public boolean pulseOnLongPressEnabled(int user) { return pulseOnLongPressAvailable() && boolSettingDefaultOff( Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, user); } private boolean pulseOnLongPressAvailable() { return !TextUtils.isEmpty(longPressSensorType()); } public boolean alwaysOnEnabled(int user) { return boolSettingDefaultOn(Settings.Secure.DOZE_ALWAYS_ON, user) && alwaysOnAvailable(); Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1884,6 +1884,9 @@ <!-- Type of the double tap sensor. Empty if double tap is not supported. --> <string name="config_dozeDoubleTapSensorType" translatable="false"></string> <!-- Type of the long press sensor. Empty if long press is not supported. --> <string name="config_dozeLongPressSensorType" translatable="false"></string> <!-- Control whether the always on display mode is available. This should only be enabled on devices where the display has be tuned to be power efficient in DOZE and/or DOZE_SUSPEND states. --> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3034,6 +3034,8 @@ <java-symbol type="array" name="config_hideWhenDisabled_packageNames" /> <java-symbol type="string" name="config_dozeLongPressSensorType" /> <java-symbol type="array" name="config_allowedGlobalInstantAppSettings" /> <java-symbol type="array" name="config_allowedSystemInstantAppSettings" /> <java-symbol type="array" name="config_allowedSecureInstantAppSettings" /> Loading
core/tests/coretests/src/android/provider/SettingsBackupTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,7 @@ public class SettingsBackupTest { Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS, Settings.Secure.DISPLAY_DENSITY_FORCED, Settings.Secure.DOZE_ALWAYS_ON, Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, Settings.Secure.EMERGENCY_ASSISTANCE_APPLICATION, Settings.Secure.ENABLED_NOTIFICATION_ASSISTANT, Settings.Secure.ENABLED_NOTIFICATION_LISTENERS, Loading