From 21b031eece01671ca066f317925d993ff987b996 Mon Sep 17 00:00:00 2001 From: Bryce Lee Date: Fri, 10 Feb 2023 17:25:18 -0800 Subject: [PATCH] Remove Dream Overlay window name and update content descriptions. This changelist sets the Dream Overlay window name to an empty string. Omitting the name causes the window to be attributed to SystemUI by Talkback for any visual element (status bar, complications) rather than the dream. This changelist also sets the content descriptions for a number of icons in the dream overlay. Test: manual Fixes: 267837462 Change-Id: Ic31d2c53d53a3e4c961cfc4e5a01245822b22b96 --- packages/SystemUI/res/values/strings.xml | 18 +++++++++++++++ .../systemui/dreams/DreamOverlayService.java | 2 ++ .../DreamOverlayStatusBarViewController.java | 23 ++++++++++++------- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 85edbec37285f..e919cc87cd54b 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -2950,4 +2950,22 @@ [CHAR LIMIT=32] --> Lock screen settings + + + Wi-Fi not available + + + Camera blocked + + + Camera and microphone blocked + + + Microphone blocked + + + Priority mode on + + + Assistant attention on diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java index 27641fe7beb8d..a14aa52225802 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java +++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java @@ -269,6 +269,8 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ */ private void addOverlayWindowLocked(WindowManager.LayoutParams layoutParams) { mWindow = new PhoneWindow(mContext); + // Default to SystemUI name for TalkBack. + mWindow.setTitle(""); mWindow.setAttributes(layoutParams); mWindow.setWindowManager(null, layoutParams.token, "DreamOverlay", true); diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayStatusBarViewController.java b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayStatusBarViewController.java index 2221a04d3aa42..74a49a8f3c886 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayStatusBarViewController.java +++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayStatusBarViewController.java @@ -259,7 +259,8 @@ public class DreamOverlayStatusBarViewController extends ViewController