Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25a33cbd authored by Jackal Guo's avatar Jackal Guo
Browse files

Update the accessibility overlay title

For the accessibility overlay window without a title, using null
instead of empty string.

Bug: 79361020
Test: atest WindowStateTests
Test: atest AccessibilityOverlayTest
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I77ddc6fca433c498058293f2f188b3f8396b0964
parent 3b92f796
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3870,7 +3870,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        final boolean isAccessibilityOverlay =
                windowInfo.type == WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY;
        if (TextUtils.isEmpty(windowInfo.title) && (isPanelWindow || isAccessibilityOverlay)) {
            windowInfo.title = mAttrs.getTitle();
            final CharSequence title = mAttrs.getTitle();
            windowInfo.title = TextUtils.isEmpty(title) ? null : title;
        }
        windowInfo.accessibilityIdOfAnchor = mAttrs.accessibilityIdOfAnchor;
        windowInfo.focused = isFocused();