From 221de3457b8bc87cfbb88560aa670970f41c9eed Mon Sep 17 00:00:00 2001 From: John Li Date: Wed, 24 Mar 2021 13:00:37 +0800 Subject: [PATCH] Add @SystemApi for Secure.UI_TRANSLATION_ENABLED Bug: 177299699 Test: manual Change-Id: I711d078281ae9cc17ebb21e6c3f857caad31016a --- core/api/system-current.txt | 1 + core/java/android/provider/Settings.java | 7 +++++-- .../test/src/android/provider/SettingsBackupTest.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index bd36d2c6ca8ea..fef7294d4adef 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -9296,6 +9296,7 @@ package android.provider { field public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = "lock_screen_show_notifications"; field public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled"; field public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = "theme_customization_overlay_packages"; + field public static final String UI_TRANSLATION_ENABLED = "ui_translation_enabled"; field public static final String USER_SETUP_COMPLETE = "user_setup_complete"; field public static final int USER_SETUP_PERSONALIZATION_COMPLETE = 10; // 0xa field public static final int USER_SETUP_PERSONALIZATION_NOT_STARTED = 0; // 0x0 diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 0d6032366712a..aaa5df299e3ae 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -8539,13 +8539,16 @@ public final class Settings { "one_handed_tutorial_show_count"; /** - * Indicates whether transform is enabled. + * Indicates whether ui translation is enabled. *

* Type: int (0 for false, 1 for true) * * @hide */ - public static final String TRANSFORM_ENABLED = "transform_enabled"; + @SystemApi + @Readable + @SuppressLint("NoSettingsProvider") + public static final String UI_TRANSLATION_ENABLED = "ui_translation_enabled"; /** * The current night mode that has been selected by the user. Owned diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java index 3877b1e000488..d1f10569f271c 100644 --- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java +++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java @@ -750,7 +750,7 @@ public class SettingsBackupTest { Settings.Secure.SUPPRESS_DOZE, Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED, Settings.Secure.ACCESSIBILITY_SHOW_WINDOW_MAGNIFICATION_PROMPT, - Settings.Secure.TRANSFORM_ENABLED); + Settings.Secure.UI_TRANSLATION_ENABLED); @Test public void systemSettingsBackedUpOrDenied() {