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

Commit 59ce935e authored by Jacky Kao's avatar Jacky Kao Committed by Android (Google) Code Review
Browse files

Merge "Fixing an embedded display as a top focused display"

parents 7accbf46 edbfd229
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -747,6 +747,13 @@ public class AccessibilityWindowManager {
         * Dumps all {@link AccessibilityWindowInfo}s here.
         */
        void dumpLocked(FileDescriptor fd, final PrintWriter pw, String[] args) {
            pw.append("Global Info [ ");
            pw.println("Top focused display Id = " + mTopFocusedDisplayId);
            pw.println("     Active Window Id = " + mActiveWindowId);
            pw.println("     Top Focused Window Id = " + mTopFocusedWindowId);
            pw.println("     Accessibility Focused Window Id = " + mAccessibilityFocusedWindowId
                    + " ]");
            pw.println();
            if (mWindows != null) {
                final int windowCount = mWindows.size();
                for (int j = 0; j < windowCount; j++) {
+6 −1
Original line number Diff line number Diff line
@@ -1357,7 +1357,12 @@ final class AccessibilityController {
                addedWindows.clear();

                // Gets the top focused display Id and window token for supporting multi-display.
                topFocusedDisplayId = mService.mRoot.getTopFocusedDisplayContent().getDisplayId();
                // If this top focused display is an embedded one, using its parent display as the
                // top focused display.
                final DisplayContent topFocusedDisplayContent =
                        mService.mRoot.getTopFocusedDisplayContent();
                topFocusedDisplayId = isEmbeddedDisplay(topFocusedDisplayContent) ? mDisplayId
                        : topFocusedDisplayContent.getDisplayId();
                topFocusedWindowToken = topFocusedWindowState.mClient.asBinder();
            }
            mCallback.onWindowsForAccessibilityChanged(forceSend, topFocusedDisplayId,