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

Commit 4debea90 authored by tom hsu's avatar tom hsu
Browse files

[Regional Preference] Add new flag to SettingsProvider

 - Add a SettingsProvider flag to save the user's preference.

Bug: b/259487708
Test: Maunal test passed
Change-Id: Ic098c06fb59b11d4a5e836fe2b9531f4b2ee1c38
parent 383a0536
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -5588,6 +5588,19 @@ public final class Settings {
        @Readable
        public static final String DESKTOP_MODE = "desktop_mode";
        /**
         * The information of locale preference. This records user's preference to avoid
         * unsynchronized and existing locale preference in
         * {@link Locale#getDefault(Locale.Category)}.
         *
         * <p><b>Note:</b> The format follow the
         * <a href="https://www.rfc-editor.org/rfc/bcp/bcp47.txt">IETF BCP47 expression</a>
         *
         * E.g. : und-u-ca-gregorian-hc-h23
         * @hide
         */
        public static final String LOCALE_PREFERENCES = "locale_preferences";
        /**
         * IMPORTANT: If you add a new public settings you also have to add it to
         * PUBLIC_SETTINGS below. If the new setting is hidden you have to add
@@ -5716,6 +5729,7 @@ public final class Settings {
            PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE);
            PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT);
            PRIVATE_SETTINGS.add(DESKTOP_MODE);
            PRIVATE_SETTINGS.add(LOCALE_PREFERENCES);
        }
        /**
+2 −1
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ public class SystemSettings {
        Settings.System.WEAR_ACCESSIBILITY_GESTURE_ENABLED,
        Settings.System.CLOCKWORK_BLUETOOTH_SETTINGS_PREF,
        Settings.System.UNREAD_NOTIFICATION_DOT_INDICATOR,
        Settings.System.AUTO_LAUNCH_MEDIA_CONTROLS
        Settings.System.AUTO_LAUNCH_MEDIA_CONTROLS,
        Settings.System.LOCALE_PREFERENCES
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -210,5 +210,6 @@ public class SystemSettingsValidators {
        VALIDATORS.put(System.CLOCKWORK_BLUETOOTH_SETTINGS_PREF, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.UNREAD_NOTIFICATION_DOT_INDICATOR, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.AUTO_LAUNCH_MEDIA_CONTROLS, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.LOCALE_PREFERENCES, ANY_STRING_VALIDATOR);
    }
}