Loading core/java/android/provider/Settings.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -5516,6 +5516,12 @@ public final class Settings { */ */ public static final String APP_IDLE_DURATION = "app_idle_duration"; public static final String APP_IDLE_DURATION = "app_idle_duration"; /** * Controls whether double tap to wake is enabled. * @hide */ public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake"; /** /** * This are the settings to be backed up. * This are the settings to be backed up. * * Loading Loading @@ -5571,7 +5577,8 @@ public final class Settings { MOUNT_UMS_PROMPT, MOUNT_UMS_PROMPT, MOUNT_UMS_NOTIFY_ENABLED, MOUNT_UMS_NOTIFY_ENABLED, UI_NIGHT_MODE, UI_NIGHT_MODE, SLEEP_TIMEOUT SLEEP_TIMEOUT, DOUBLE_TAP_TO_WAKE, }; }; /** /** Loading core/res/res/values/config.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2141,4 +2141,7 @@ <!-- This config is ued to determine whether animations are allowed in low power mode. --> <!-- This config is ued to determine whether animations are allowed in low power mode. --> <bool name="config_allowAnimationsInLowPowerMode">false</bool> <bool name="config_allowAnimationsInLowPowerMode">false</bool> <!-- Whether device supports double tap to wake --> <bool name="config_supportDoubleTapWake">false</bool> </resources> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -2261,4 +2261,5 @@ <java-symbol type="layout" name="chooser_row" /> <java-symbol type="layout" name="chooser_row" /> <java-symbol type="color" name="chooser_service_row_background_color" /> <java-symbol type="color" name="chooser_service_row_background_color" /> <java-symbol type="id" name="target_badge" /> <java-symbol type="id" name="target_badge" /> <java-symbol type="bool" name="config_supportDoubleTapWake" /> </resources> </resources> packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -207,4 +207,7 @@ <!-- Default for Settings.Global.GUEST_USER_ENABLED --> <!-- Default for Settings.Global.GUEST_USER_ENABLED --> <bool name="def_guest_user_enabled">true</bool> <bool name="def_guest_user_enabled">true</bool> <!-- Default state of tap to wake --> <bool name="def_double_tap_to_wake">true</bool> </resources> </resources> packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +12 −1 Original line number Original line Diff line number Diff line Loading @@ -1791,7 +1791,7 @@ public class SettingsProvider extends ContentProvider { } } private final class UpgradeController { private final class UpgradeController { private static final int SETTINGS_VERSION = 119; private static final int SETTINGS_VERSION = 120; private final int mUserId; private final int mUserId; Loading Loading @@ -1908,6 +1908,17 @@ public class SettingsProvider extends ContentProvider { currentVersion = 119; currentVersion = 119; } } // v120: Add double tap to wake setting. if (currentVersion == 119) { SettingsState secureSettings = getSecureSettingsLocked(userId); secureSettings.insertSettingLocked(Settings.Secure.DOUBLE_TAP_TO_WAKE, getContext().getResources().getBoolean( R.bool.def_double_tap_to_wake) ? "1" : "0", SettingsState.SYSTEM_PACKAGE_NAME); currentVersion = 120; } // vXXX: Add new settings above this point. // vXXX: Add new settings above this point. // Return the current version. // Return the current version. Loading Loading
core/java/android/provider/Settings.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -5516,6 +5516,12 @@ public final class Settings { */ */ public static final String APP_IDLE_DURATION = "app_idle_duration"; public static final String APP_IDLE_DURATION = "app_idle_duration"; /** * Controls whether double tap to wake is enabled. * @hide */ public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake"; /** /** * This are the settings to be backed up. * This are the settings to be backed up. * * Loading Loading @@ -5571,7 +5577,8 @@ public final class Settings { MOUNT_UMS_PROMPT, MOUNT_UMS_PROMPT, MOUNT_UMS_NOTIFY_ENABLED, MOUNT_UMS_NOTIFY_ENABLED, UI_NIGHT_MODE, UI_NIGHT_MODE, SLEEP_TIMEOUT SLEEP_TIMEOUT, DOUBLE_TAP_TO_WAKE, }; }; /** /** Loading
core/res/res/values/config.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2141,4 +2141,7 @@ <!-- This config is ued to determine whether animations are allowed in low power mode. --> <!-- This config is ued to determine whether animations are allowed in low power mode. --> <bool name="config_allowAnimationsInLowPowerMode">false</bool> <bool name="config_allowAnimationsInLowPowerMode">false</bool> <!-- Whether device supports double tap to wake --> <bool name="config_supportDoubleTapWake">false</bool> </resources> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -2261,4 +2261,5 @@ <java-symbol type="layout" name="chooser_row" /> <java-symbol type="layout" name="chooser_row" /> <java-symbol type="color" name="chooser_service_row_background_color" /> <java-symbol type="color" name="chooser_service_row_background_color" /> <java-symbol type="id" name="target_badge" /> <java-symbol type="id" name="target_badge" /> <java-symbol type="bool" name="config_supportDoubleTapWake" /> </resources> </resources>
packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -207,4 +207,7 @@ <!-- Default for Settings.Global.GUEST_USER_ENABLED --> <!-- Default for Settings.Global.GUEST_USER_ENABLED --> <bool name="def_guest_user_enabled">true</bool> <bool name="def_guest_user_enabled">true</bool> <!-- Default state of tap to wake --> <bool name="def_double_tap_to_wake">true</bool> </resources> </resources>
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +12 −1 Original line number Original line Diff line number Diff line Loading @@ -1791,7 +1791,7 @@ public class SettingsProvider extends ContentProvider { } } private final class UpgradeController { private final class UpgradeController { private static final int SETTINGS_VERSION = 119; private static final int SETTINGS_VERSION = 120; private final int mUserId; private final int mUserId; Loading Loading @@ -1908,6 +1908,17 @@ public class SettingsProvider extends ContentProvider { currentVersion = 119; currentVersion = 119; } } // v120: Add double tap to wake setting. if (currentVersion == 119) { SettingsState secureSettings = getSecureSettingsLocked(userId); secureSettings.insertSettingLocked(Settings.Secure.DOUBLE_TAP_TO_WAKE, getContext().getResources().getBoolean( R.bool.def_double_tap_to_wake) ? "1" : "0", SettingsState.SYSTEM_PACKAGE_NAME); currentVersion = 120; } // vXXX: Add new settings above this point. // vXXX: Add new settings above this point. // Return the current version. // Return the current version. Loading