diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-12-07 00:09:08 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-12-07 00:09:08 +0000 |
commit | dd631168c5ea5f9f0124ef134c0544078a8e75d6 (patch) | |
tree | 7878e120e368fc34eace4dad07456ffe0db99047 | |
parent | 42bdb2c9f0fc63de9f4df92779ecc1b8e7bdbaec (diff) | |
parent | 13673f84a600bcf3292b3841d8c16229e3c2af80 (diff) |
Snap for 7973711 from 13673f84a600bcf3292b3841d8c16229e3c2af80 to sc-v2-release
Change-Id: I5e822c9a7912165c4b51d09a6bc2fe22882c5268
-rwxr-xr-x | res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/com/android/customization/model/mode/DarkModeSectionController.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 3eca5990..5109b4fa 100755 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -233,6 +233,8 @@ <!-- The title of mode section view. [CHAR_LIMIT=20] --> <string name="mode_title" msgid="1000319159005403986">Dark theme</string> <string name="mode_disabled_msg" msgid="1926077857799715086">Temporarily disabled due to Battery Saver</string> + <!-- The text for A11y announcement when theme changes. --> + <string name="mode_changed">Theme changed</string> <!-- Title of a section of the customization where the user can select color override for icon. [CHAR LIMIT=30] --> <string name="themed_icon_title" msgid="4305612684940220645">Themed icons</string> diff --git a/src/com/android/customization/model/mode/DarkModeSectionController.java b/src/com/android/customization/model/mode/DarkModeSectionController.java index 382162ea..f56b7092 100644 --- a/src/com/android/customization/model/mode/DarkModeSectionController.java +++ b/src/com/android/customization/model/mode/DarkModeSectionController.java @@ -128,7 +128,11 @@ public class DarkModeSectionController implements UiModeManager uiModeManager = context.getSystemService(UiModeManager.class); int shortDelay = context.getResources().getInteger(android.R.integer.config_shortAnimTime); new Handler(Looper.getMainLooper()).postDelayed( - () -> uiModeManager.setNightModeActivated(viewActivated), + () -> { + mDarkModeSectionView.announceForAccessibility( + context.getString(R.string.mode_changed)); + uiModeManager.setNightModeActivated(viewActivated); + }, /* delayMillis= */ shortDelay); } |