Loading services/core/java/com/android/server/wm/AccessibilityController.java +5 −15 Original line number Diff line number Diff line Loading @@ -1540,16 +1540,12 @@ final class AccessibilityController { private static final boolean DEBUG = false; private final List<AccessibilityWindow> mTempA11yWindows = new ArrayList<>(); private final Set<IBinder> mTempBinderSet = new ArraySet<>(); private final Point mTempPoint = new Point(); private final Region mTempRegion = new Region(); private final Region mTempRegion1 = new Region(); private final Region mTempRegion2 = new Region(); private final WindowManagerService mService; Loading Loading @@ -1617,7 +1613,8 @@ final class AccessibilityController { Slog.i(LOG_TAG, "computeChangedWindows()"); } List<WindowInfo> windows = new ArrayList<>(); final List<WindowInfo> windows = new ArrayList<>(); final List<AccessibilityWindow> visibleWindows = new ArrayList<>(); final int topFocusedDisplayId; IBinder topFocusedWindowToken = null; Loading Loading @@ -1652,7 +1649,6 @@ final class AccessibilityController { Region unaccountedSpace = mTempRegion; unaccountedSpace.set(0, 0, screenWidth, screenHeight); final List<AccessibilityWindow> visibleWindows = mTempA11yWindows; mA11yWindowsPopulator.populateVisibleWindowsOnScreenLocked( mDisplayId, visibleWindows); Set<IBinder> addedWindows = mTempBinderSet; Loading Loading @@ -1709,7 +1705,6 @@ final class AccessibilityController { } } visibleWindows.clear(); addedWindows.clear(); // Gets the top focused display Id and window token for supporting multi-display. Loading @@ -1720,7 +1715,9 @@ final class AccessibilityController { topFocusedWindowToken, windows); // Recycle the windows as we do not need them. clearAndRecycleWindows(windows); for (final AccessibilityWindowsPopulator.AccessibilityWindow window : visibleWindows) { window.getWindowInfo().recycle(); } mInitialized = true; } Loading Loading @@ -1802,13 +1799,6 @@ final class AccessibilityController { tokenOut.add(window.token); } private static void clearAndRecycleWindows(List<WindowInfo> windows) { final int windowCount = windows.size(); for (int i = windowCount - 1; i >= 0; i--) { windows.remove(i).recycle(); } } private static boolean isReportedWindowType(int windowType) { return (windowType != WindowManager.LayoutParams.TYPE_WALLPAPER && windowType != WindowManager.LayoutParams.TYPE_BOOT_PROGRESS Loading Loading
services/core/java/com/android/server/wm/AccessibilityController.java +5 −15 Original line number Diff line number Diff line Loading @@ -1540,16 +1540,12 @@ final class AccessibilityController { private static final boolean DEBUG = false; private final List<AccessibilityWindow> mTempA11yWindows = new ArrayList<>(); private final Set<IBinder> mTempBinderSet = new ArraySet<>(); private final Point mTempPoint = new Point(); private final Region mTempRegion = new Region(); private final Region mTempRegion1 = new Region(); private final Region mTempRegion2 = new Region(); private final WindowManagerService mService; Loading Loading @@ -1617,7 +1613,8 @@ final class AccessibilityController { Slog.i(LOG_TAG, "computeChangedWindows()"); } List<WindowInfo> windows = new ArrayList<>(); final List<WindowInfo> windows = new ArrayList<>(); final List<AccessibilityWindow> visibleWindows = new ArrayList<>(); final int topFocusedDisplayId; IBinder topFocusedWindowToken = null; Loading Loading @@ -1652,7 +1649,6 @@ final class AccessibilityController { Region unaccountedSpace = mTempRegion; unaccountedSpace.set(0, 0, screenWidth, screenHeight); final List<AccessibilityWindow> visibleWindows = mTempA11yWindows; mA11yWindowsPopulator.populateVisibleWindowsOnScreenLocked( mDisplayId, visibleWindows); Set<IBinder> addedWindows = mTempBinderSet; Loading Loading @@ -1709,7 +1705,6 @@ final class AccessibilityController { } } visibleWindows.clear(); addedWindows.clear(); // Gets the top focused display Id and window token for supporting multi-display. Loading @@ -1720,7 +1715,9 @@ final class AccessibilityController { topFocusedWindowToken, windows); // Recycle the windows as we do not need them. clearAndRecycleWindows(windows); for (final AccessibilityWindowsPopulator.AccessibilityWindow window : visibleWindows) { window.getWindowInfo().recycle(); } mInitialized = true; } Loading Loading @@ -1802,13 +1799,6 @@ final class AccessibilityController { tokenOut.add(window.token); } private static void clearAndRecycleWindows(List<WindowInfo> windows) { final int windowCount = windows.size(); for (int i = windowCount - 1; i >= 0; i--) { windows.remove(i).recycle(); } } private static boolean isReportedWindowType(int windowType) { return (windowType != WindowManager.LayoutParams.TYPE_WALLPAPER && windowType != WindowManager.LayoutParams.TYPE_BOOT_PROGRESS Loading