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

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

Merge "Fixes the wrong layer order of the windows"

parents b64f8b7d d8f1f7b1
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -557,12 +557,17 @@ public class AccessibilityWindowManager {
                shouldClearAccessibilityFocus = mAccessibilityFocusedWindowId
                    != AccessibilityWindowInfo.UNDEFINED_WINDOW_ID;
            }

            boolean hasWindowIgnore = false;
            if (windowCount > 0) {
                for (int i = 0; i < windowCount; i++) {
                    final WindowInfo windowInfo = windows.get(i);
                    final AccessibilityWindowInfo window;
                    if (mTrackingWindows) {
                        window = populateReportedWindowLocked(userId, windowInfo);
                        if (window == null) {
                            hasWindowIgnore = true;
                        }
                    } else {
                        window = null;
                    }
@@ -591,6 +596,13 @@ public class AccessibilityWindowManager {
                    }
                }
                final int accessibilityWindowCount = mWindows.size();
                // Re-order the window layer of all windows in the windows list because there's
                // window not been added into the windows list.
                if (hasWindowIgnore) {
                    for (int i = 0; i < accessibilityWindowCount; i++) {
                        mWindows.get(i).setLayer(accessibilityWindowCount - 1 - i);
                    }
                }
                if (isTopFocusedDisplay) {
                    if (mTouchInteractionInProgress && activeWindowGone) {
                        mActiveWindowId = mTopFocusedWindowId;