Merge "[Regional Preference] Add new flag to SettingsProvider"

This commit is contained in:
Tom Hsu
2022-12-30 03:20:12 +00:00
committed by Android (Google) Code Review
3 changed files with 17 additions and 1 deletions

View File

@@ -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);
}
/**

View File

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

View File

@@ -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);
}
}