From 81f9b1994150c24a488d2d81f6ad84861b30df5c Mon Sep 17 00:00:00 2001 From: ryanlwlin Date: Fri, 17 Jun 2022 12:26:10 +0800 Subject: Fix no announcment when the PIP menu shows on the screen In the legacy implemenation, the PIP menu is a activity, so the property of windowInfo, inPictureInPicture is true. Screen-reader will read the the tile for the new pitcure-in-picture window. We set this property of the PIP menu to false because it is not a activity anymore, however, it ends up that there is no announcment anymore. To fix it with the simplest way, we set this property to true. Bug: 236216130 Test: manual test, enable Talback and show the pip menu to see if there is any announcement Change-Id: I73e36242db074c747769b38b328a9cdc742fbd90 --- .../core/java/com/android/server/wm/AccessibilityWindowsPopulator.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'services') diff --git a/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java b/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java index 3b4aa8e6b701..4b8a5b7fcf56 100644 --- a/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java +++ b/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java @@ -853,6 +853,8 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { windowInfo.title = "Splitscreen Divider"; } else if (window.mIsPIPMenu) { windowInfo.title = "Picture-in-Picture menu"; + // Set it to true to be consistent with the legacy implementation. + windowInfo.inPictureInPicture = true; } return windowInfo; } -- cgit v1.2.3-59-g8ed1b