Loading services/core/java/com/android/server/wm/AccessibilityController.java +65 −48 Original line number Diff line number Diff line Loading @@ -1610,12 +1610,14 @@ final class AccessibilityController { final Region regionInScreen = new Region(); computeWindowRegionInScreen(windowState, regionInScreen); if (windowMattersToAccessibility(windowState, regionInScreen, unaccountedSpace, if (windowMattersToAccessibility(windowState, regionInScreen, unaccountedSpace, skipRemainingWindowsForTaskFragments)) { addPopulatedWindowInfo(windowState, regionInScreen, windows, addedWindows); if (windowMattersToUnaccountedSpaceComputation(windowState)) { updateUnaccountedSpace(windowState, regionInScreen, unaccountedSpace, skipRemainingWindowsForTaskFragments); } focusedWindowAdded |= windowState.isFocused(); } else if (isUntouchableNavigationBar(windowState, mTempRegion1)) { // If this widow is navigation bar without touchable region, accounting the Loading Loading @@ -1664,6 +1666,25 @@ final class AccessibilityController { mInitialized = true; } // Some windows should be excluded from unaccounted space computation, though they still // should be reported private boolean windowMattersToUnaccountedSpaceComputation(WindowState windowState) { // Do not account space of trusted non-touchable windows, except the split-screen // divider. // If it's not trusted, touch events are not sent to the windows behind it. if (((windowState.mAttrs.flags & WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0) && (windowState.mAttrs.type != TYPE_DOCK_DIVIDER) && windowState.isTrustedOverlay()) { return false; } if (windowState.mAttrs.type == WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY) { return false; } return true; } private boolean windowMattersToAccessibility(WindowState windowState, Region regionInScreen, Region unaccountedSpace, ArrayList<TaskFragment> skipRemainingWindowsForTaskFragments) { Loading Loading @@ -1707,9 +1728,6 @@ final class AccessibilityController { private void updateUnaccountedSpace(WindowState windowState, Region regionInScreen, Region unaccountedSpace, ArrayList<TaskFragment> skipRemainingWindowsForTaskFragments) { if (windowState.mAttrs.type != WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY) { // Account for the space this window takes if the window // is not an accessibility overlay which does not change // the reported windows. Loading Loading @@ -1755,7 +1773,6 @@ final class AccessibilityController { Region.Op.REVERSE_DIFFERENCE); } } } private void computeWindowRegionInScreen(WindowState windowState, Region outRegion) { // Get the touchable frame. Loading services/core/java/com/android/server/wm/InputWindowHandleWrapper.java +4 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,10 @@ class InputWindowHandleWrapper { mChanged = true; } boolean isTrustedOverlay() { return mHandle.trustedOverlay; } @Override public String toString() { return mHandle + ", changed=" + mChanged; Loading services/core/java/com/android/server/wm/WindowState.java +4 −0 Original line number Diff line number Diff line Loading @@ -6257,4 +6257,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP scheduleAnimation(); return true; } boolean isTrustedOverlay() { return mInputWindowHandle.isTrustedOverlay(); } } Loading
services/core/java/com/android/server/wm/AccessibilityController.java +65 −48 Original line number Diff line number Diff line Loading @@ -1610,12 +1610,14 @@ final class AccessibilityController { final Region regionInScreen = new Region(); computeWindowRegionInScreen(windowState, regionInScreen); if (windowMattersToAccessibility(windowState, regionInScreen, unaccountedSpace, if (windowMattersToAccessibility(windowState, regionInScreen, unaccountedSpace, skipRemainingWindowsForTaskFragments)) { addPopulatedWindowInfo(windowState, regionInScreen, windows, addedWindows); if (windowMattersToUnaccountedSpaceComputation(windowState)) { updateUnaccountedSpace(windowState, regionInScreen, unaccountedSpace, skipRemainingWindowsForTaskFragments); } focusedWindowAdded |= windowState.isFocused(); } else if (isUntouchableNavigationBar(windowState, mTempRegion1)) { // If this widow is navigation bar without touchable region, accounting the Loading Loading @@ -1664,6 +1666,25 @@ final class AccessibilityController { mInitialized = true; } // Some windows should be excluded from unaccounted space computation, though they still // should be reported private boolean windowMattersToUnaccountedSpaceComputation(WindowState windowState) { // Do not account space of trusted non-touchable windows, except the split-screen // divider. // If it's not trusted, touch events are not sent to the windows behind it. if (((windowState.mAttrs.flags & WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0) && (windowState.mAttrs.type != TYPE_DOCK_DIVIDER) && windowState.isTrustedOverlay()) { return false; } if (windowState.mAttrs.type == WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY) { return false; } return true; } private boolean windowMattersToAccessibility(WindowState windowState, Region regionInScreen, Region unaccountedSpace, ArrayList<TaskFragment> skipRemainingWindowsForTaskFragments) { Loading Loading @@ -1707,9 +1728,6 @@ final class AccessibilityController { private void updateUnaccountedSpace(WindowState windowState, Region regionInScreen, Region unaccountedSpace, ArrayList<TaskFragment> skipRemainingWindowsForTaskFragments) { if (windowState.mAttrs.type != WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY) { // Account for the space this window takes if the window // is not an accessibility overlay which does not change // the reported windows. Loading Loading @@ -1755,7 +1773,6 @@ final class AccessibilityController { Region.Op.REVERSE_DIFFERENCE); } } } private void computeWindowRegionInScreen(WindowState windowState, Region outRegion) { // Get the touchable frame. Loading
services/core/java/com/android/server/wm/InputWindowHandleWrapper.java +4 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,10 @@ class InputWindowHandleWrapper { mChanged = true; } boolean isTrustedOverlay() { return mHandle.trustedOverlay; } @Override public String toString() { return mHandle + ", changed=" + mChanged; Loading
services/core/java/com/android/server/wm/WindowState.java +4 −0 Original line number Diff line number Diff line Loading @@ -6257,4 +6257,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP scheduleAnimation(); return true; } boolean isTrustedOverlay() { return mInputWindowHandle.isTrustedOverlay(); } }