Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit deb356dd authored by Jason Monk's avatar Jason Monk Committed by Android Git Automerger
Browse files

am 2df11817: Merge "Add control for double tap to wake setting" into mnc-dev

* commit '2df11817':
  Add control for double tap to wake setting
parents bca2c7a1 2df11817
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -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.
         *
         *
@@ -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,
        };
        };


        /**
        /**
+3 −0
Original line number Original line Diff line number Diff line
@@ -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>
+1 −0
Original line number Original line Diff line number Diff line
@@ -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>
+3 −0
Original line number Original line Diff line number Diff line
@@ -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>
+12 −1
Original line number Original line Diff line number Diff line
@@ -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;


@@ -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