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

Commit 423af758 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Introduced ReadOnlyWindowList"

parents d946d91b f7cab10b
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -648,12 +648,11 @@ final class AccessibilityController {
            }

            private void populateWindowsOnScreenLocked(SparseArray<WindowState> outWindows) {
                DisplayContent displayContent = mWindowManagerService
                        .getDefaultDisplayContentLocked();
                WindowList windowList = displayContent.getWindowList();
                final DisplayContent dc = mWindowManagerService.getDefaultDisplayContentLocked();
                final ReadOnlyWindowList windowList = dc.getReadOnlyWindowList();
                final int windowCount = windowList.size();
                for (int i = 0; i < windowCount; i++) {
                    WindowState windowState = windowList.get(i);
                    final WindowState windowState = windowList.get(i);
                    if (windowState.isOnScreen() && windowState.isVisibleLw() &&
                            !windowState.mWinAnimator.mEnterAnimationPending) {
                        outWindows.put(windowState.mLayer, windowState);
@@ -1027,9 +1026,8 @@ final class AccessibilityController {
                Region unaccountedSpace = mTempRegion;
                unaccountedSpace.set(0, 0, screenWidth, screenHeight);

                SparseArray<WindowState> visibleWindows = mTempWindowStates;
                final SparseArray<WindowState> visibleWindows = mTempWindowStates;
                populateVisibleWindowsOnScreenLocked(visibleWindows);

                Set<IBinder> addedWindows = mTempBinderSet;
                addedWindows.clear();

@@ -1299,12 +1297,11 @@ final class AccessibilityController {
        }

        private void populateVisibleWindowsOnScreenLocked(SparseArray<WindowState> outWindows) {
            DisplayContent displayContent = mWindowManagerService
                    .getDefaultDisplayContentLocked();
            WindowList windowList = displayContent.getWindowList();
            final DisplayContent dc = mWindowManagerService.getDefaultDisplayContentLocked();
            final ReadOnlyWindowList windowList = dc.getReadOnlyWindowList();
            final int windowCount = windowList.size();
            for (int i = 0; i < windowCount; i++) {
                WindowState windowState = windowList.get(i);
                final WindowState windowState = windowList.get(i);
                if (windowState.isVisibleLw()) {
                    outWindows.put(windowState.mLayer, windowState);
                }
+1 −2
Original line number Diff line number Diff line
@@ -946,8 +946,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree

            if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE || DEBUG_STARTING_WINDOW) Slog.v(TAG_WM,
                    "Removing starting window: " + tStartingWindow);
            getDisplayContent().getWindowList().remove(tStartingWindow);
            mService.mWindowsChanged = true;
            getDisplayContent().removeFromWindowList(tStartingWindow);
            if (DEBUG_ADD_REMOVE) Slog.v(TAG_WM,
                    "Removing starting " + tStartingWindow + " from " + fromToken);
            fromToken.removeChild(tStartingWindow);
+895 −55

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -268,7 +268,7 @@ public class DockedStackDividerController implements DimLayerUser {
    }

    private void resetDragResizingChangeReported() {
        final WindowList windowList = mDisplayContent.getWindowList();
        final ReadOnlyWindowList windowList = mDisplayContent.getReadOnlyWindowList();
        for (int i = windowList.size() - 1; i >= 0; i--) {
            windowList.get(i).resetDragResizingChangeReported();
        }
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ class DragState {
            Slog.d(TAG_WM, "broadcasting DRAG_STARTED at (" + touchX + ", " + touchY + ")");
        }

        final WindowList windows = mDisplayContent.getWindowList();
        final ReadOnlyWindowList windows = mDisplayContent.getReadOnlyWindowList();
        final int N = windows.size();
        for (int i = 0; i < N; i++) {
            sendDragStartedLw(windows.get(i), touchX, touchY, mDataDescription);
Loading