Loading core/java/android/hardware/display/AmbientDisplayConfiguration.java +14 −1 Original line number Original line Diff line number Diff line Loading @@ -52,7 +52,8 @@ public class AmbientDisplayConfiguration { || wakeDisplayGestureEnabled(user) || wakeDisplayGestureEnabled(user) || pickupGestureEnabled(user) || pickupGestureEnabled(user) || tapGestureEnabled(user) || tapGestureEnabled(user) || doubleTapGestureEnabled(user); || doubleTapGestureEnabled(user) || quickPickupSensorEnabled(user); } } /** {@hide} */ /** {@hide} */ Loading Loading @@ -99,6 +100,13 @@ public class AmbientDisplayConfiguration { return !TextUtils.isEmpty(doubleTapSensorType()); return !TextUtils.isEmpty(doubleTapSensorType()); } } /** {@hide} */ public boolean quickPickupSensorEnabled(int user) { return boolSettingDefaultOff(Settings.Secure.DOZE_QUICK_PICKUP_GESTURE, user) && !TextUtils.isEmpty(quickPickupSensorType()) && !alwaysOnEnabled(user); } /** {@hide} */ /** {@hide} */ public boolean wakeScreenGestureAvailable() { public boolean wakeScreenGestureAvailable() { return mContext.getResources() return mContext.getResources() Loading Loading @@ -142,6 +150,11 @@ public class AmbientDisplayConfiguration { return mContext.getResources().getString(R.string.config_dozeUdfpsLongPressSensorType); return mContext.getResources().getString(R.string.config_dozeUdfpsLongPressSensorType); } } /** {@hide} */ public String quickPickupSensorType() { return mContext.getResources().getString(R.string.config_quickPickupSensorType); } /** {@hide} */ /** {@hide} */ public boolean pulseOnLongPressEnabled(int user) { public boolean pulseOnLongPressEnabled(int user) { return pulseOnLongPressAvailable() && boolSettingDefaultOff( return pulseOnLongPressAvailable() && boolSettingDefaultOff( Loading core/java/android/provider/Settings.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -8368,6 +8368,14 @@ public final class Settings { @Readable @Readable public static final String DOZE_WAKE_DISPLAY_GESTURE = "doze_wake_display_gesture"; public static final String DOZE_WAKE_DISPLAY_GESTURE = "doze_wake_display_gesture"; /** * Gesture that wakes up the display on quick pickup, toggling between * {@link Display.STATE_OFF} and {@link Display.STATE_DOZE}. * @hide */ @Readable public static final String DOZE_QUICK_PICKUP_GESTURE = "doze_quick_pickup_gesture"; /** /** * Whether the device should suppress the current doze configuration and disable dozing. * Whether the device should suppress the current doze configuration and disable dozing. * @hide * @hide Loading core/res/res/values/config.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2272,6 +2272,9 @@ <bool name="config_dozeWakeLockScreenSensorAvailable">false</bool> <bool name="config_dozeWakeLockScreenSensorAvailable">false</bool> <integer name="config_dozeWakeLockScreenDebounce">300</integer> <integer name="config_dozeWakeLockScreenDebounce">300</integer> <!-- Type of the quick pickup sensor. Empty if quick pickup is not supported. --> <string name="config_quickPickupSensorType" translatable="false"></string> <!-- Control whether the always on display mode is available. This should only be enabled on <!-- Control whether the always on display mode is available. This should only be enabled on devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND states. --> states. --> Loading core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -3595,6 +3595,7 @@ <java-symbol type="string" name="config_dozeUdfpsLongPressSensorType" /> <java-symbol type="string" name="config_dozeUdfpsLongPressSensorType" /> <java-symbol type="bool" name="config_dozeWakeLockScreenSensorAvailable" /> <java-symbol type="bool" name="config_dozeWakeLockScreenSensorAvailable" /> <java-symbol type="integer" name="config_dozeWakeLockScreenDebounce" /> <java-symbol type="integer" name="config_dozeWakeLockScreenDebounce" /> <java-symbol type="string" name="config_quickPickupSensorType" /> <java-symbol type="array" name="config_allowedGlobalInstantAppSettings" /> <java-symbol type="array" name="config_allowedGlobalInstantAppSettings" /> <java-symbol type="array" name="config_allowedSystemInstantAppSettings" /> <java-symbol type="array" name="config_allowedSystemInstantAppSettings" /> Loading packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -153,6 +153,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.DOZE_TAP_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_TAP_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_LOCK_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_LOCK_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_DISPLAY_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_DISPLAY_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_QUICK_PICKUP_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NFC_PAYMENT_DEFAULT_COMPONENT, COMPONENT_NAME_VALIDATOR); VALIDATORS.put(Secure.NFC_PAYMENT_DEFAULT_COMPONENT, COMPONENT_NAME_VALIDATOR); VALIDATORS.put( VALIDATORS.put( Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN, NON_NEGATIVE_INTEGER_VALIDATOR); Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN, NON_NEGATIVE_INTEGER_VALIDATOR); Loading Loading
core/java/android/hardware/display/AmbientDisplayConfiguration.java +14 −1 Original line number Original line Diff line number Diff line Loading @@ -52,7 +52,8 @@ public class AmbientDisplayConfiguration { || wakeDisplayGestureEnabled(user) || wakeDisplayGestureEnabled(user) || pickupGestureEnabled(user) || pickupGestureEnabled(user) || tapGestureEnabled(user) || tapGestureEnabled(user) || doubleTapGestureEnabled(user); || doubleTapGestureEnabled(user) || quickPickupSensorEnabled(user); } } /** {@hide} */ /** {@hide} */ Loading Loading @@ -99,6 +100,13 @@ public class AmbientDisplayConfiguration { return !TextUtils.isEmpty(doubleTapSensorType()); return !TextUtils.isEmpty(doubleTapSensorType()); } } /** {@hide} */ public boolean quickPickupSensorEnabled(int user) { return boolSettingDefaultOff(Settings.Secure.DOZE_QUICK_PICKUP_GESTURE, user) && !TextUtils.isEmpty(quickPickupSensorType()) && !alwaysOnEnabled(user); } /** {@hide} */ /** {@hide} */ public boolean wakeScreenGestureAvailable() { public boolean wakeScreenGestureAvailable() { return mContext.getResources() return mContext.getResources() Loading Loading @@ -142,6 +150,11 @@ public class AmbientDisplayConfiguration { return mContext.getResources().getString(R.string.config_dozeUdfpsLongPressSensorType); return mContext.getResources().getString(R.string.config_dozeUdfpsLongPressSensorType); } } /** {@hide} */ public String quickPickupSensorType() { return mContext.getResources().getString(R.string.config_quickPickupSensorType); } /** {@hide} */ /** {@hide} */ public boolean pulseOnLongPressEnabled(int user) { public boolean pulseOnLongPressEnabled(int user) { return pulseOnLongPressAvailable() && boolSettingDefaultOff( return pulseOnLongPressAvailable() && boolSettingDefaultOff( Loading
core/java/android/provider/Settings.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -8368,6 +8368,14 @@ public final class Settings { @Readable @Readable public static final String DOZE_WAKE_DISPLAY_GESTURE = "doze_wake_display_gesture"; public static final String DOZE_WAKE_DISPLAY_GESTURE = "doze_wake_display_gesture"; /** * Gesture that wakes up the display on quick pickup, toggling between * {@link Display.STATE_OFF} and {@link Display.STATE_DOZE}. * @hide */ @Readable public static final String DOZE_QUICK_PICKUP_GESTURE = "doze_quick_pickup_gesture"; /** /** * Whether the device should suppress the current doze configuration and disable dozing. * Whether the device should suppress the current doze configuration and disable dozing. * @hide * @hide Loading
core/res/res/values/config.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2272,6 +2272,9 @@ <bool name="config_dozeWakeLockScreenSensorAvailable">false</bool> <bool name="config_dozeWakeLockScreenSensorAvailable">false</bool> <integer name="config_dozeWakeLockScreenDebounce">300</integer> <integer name="config_dozeWakeLockScreenDebounce">300</integer> <!-- Type of the quick pickup sensor. Empty if quick pickup is not supported. --> <string name="config_quickPickupSensorType" translatable="false"></string> <!-- Control whether the always on display mode is available. This should only be enabled on <!-- Control whether the always on display mode is available. This should only be enabled on devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND states. --> states. --> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -3595,6 +3595,7 @@ <java-symbol type="string" name="config_dozeUdfpsLongPressSensorType" /> <java-symbol type="string" name="config_dozeUdfpsLongPressSensorType" /> <java-symbol type="bool" name="config_dozeWakeLockScreenSensorAvailable" /> <java-symbol type="bool" name="config_dozeWakeLockScreenSensorAvailable" /> <java-symbol type="integer" name="config_dozeWakeLockScreenDebounce" /> <java-symbol type="integer" name="config_dozeWakeLockScreenDebounce" /> <java-symbol type="string" name="config_quickPickupSensorType" /> <java-symbol type="array" name="config_allowedGlobalInstantAppSettings" /> <java-symbol type="array" name="config_allowedGlobalInstantAppSettings" /> <java-symbol type="array" name="config_allowedSystemInstantAppSettings" /> <java-symbol type="array" name="config_allowedSystemInstantAppSettings" /> Loading
packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -153,6 +153,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.DOZE_TAP_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_TAP_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_LOCK_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_LOCK_SCREEN_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_DISPLAY_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_WAKE_DISPLAY_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.DOZE_QUICK_PICKUP_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NFC_PAYMENT_DEFAULT_COMPONENT, COMPONENT_NAME_VALIDATOR); VALIDATORS.put(Secure.NFC_PAYMENT_DEFAULT_COMPONENT, COMPONENT_NAME_VALIDATOR); VALIDATORS.put( VALIDATORS.put( Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN, NON_NEGATIVE_INTEGER_VALIDATOR); Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN, NON_NEGATIVE_INTEGER_VALIDATOR); Loading