Loading core/java/android/app/TaskEmbedder.java +5 −6 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ public class TaskEmbedder { return; } reportLocation(mHost.getScreenToTaskMatrix(), mHost.getPositionInWindow()); applyTapExcludeRegion(mHost.getWindow(), hashCode(), mHost.getTapExcludeRegion()); applyTapExcludeRegion(mHost.getWindow(), mHost.getTapExcludeRegion()); } /** Loading Loading @@ -458,13 +458,12 @@ public class TaskEmbedder { * {@link #updateLocationAndTapExcludeRegion()}. This method * is provided as an optimization when managing multiple TaskSurfaces within a view. * * @see IWindowSession#updateTapExcludeRegion(IWindow, int, Region) * @see IWindowSession#updateTapExcludeRegion(IWindow, Region) */ private void applyTapExcludeRegion(IWindow window, int regionId, @Nullable Region tapExcludeRegion) { private void applyTapExcludeRegion(IWindow window, @Nullable Region tapExcludeRegion) { try { IWindowSession session = WindowManagerGlobal.getWindowSession(); session.updateTapExcludeRegion(window, regionId, tapExcludeRegion); session.updateTapExcludeRegion(window, tapExcludeRegion); } catch (RemoteException e) { e.rethrowAsRuntimeException(); } Loading @@ -486,7 +485,7 @@ public class TaskEmbedder { Log.w(TAG, "clearTapExcludeRegion: not attached to window!"); return; } applyTapExcludeRegion(mHost.getWindow(), hashCode(), null); applyTapExcludeRegion(mHost.getWindow(), null); } /** Loading core/java/android/view/IWindowSession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ interface IWindowSession { * will neither be dispatched to this window nor change the focus to this window. Passing an * invalid region will remove the area from the exclude region of this window. */ void updateTapExcludeRegion(IWindow window, int regionId, in Region region); void updateTapExcludeRegion(IWindow window, in Region region); /** * Called when the client has changed the local insets state, and now the server should reflect Loading core/java/android/view/WindowlessWindowManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -336,7 +336,7 @@ public class WindowlessWindowManager implements IWindowSession { } @Override public void updateTapExcludeRegion(android.view.IWindow window, int regionId, public void updateTapExcludeRegion(android.view.IWindow window, android.graphics.Region region) { } Loading services/core/java/com/android/server/wm/AccessibilityController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1309,7 +1309,7 @@ final class AccessibilityController { // If a window has tap exclude region, we need to account it. final Region displayRegion = new Region(windowState.getDisplayFrameLw()); final Region tapExcludeRegion = new Region(); windowState.amendTapExcludeRegion(tapExcludeRegion); windowState.getTapExcludeRegion(tapExcludeRegion); displayRegion.op(tapExcludeRegion, displayRegion, Region.Op.REVERSE_DIFFERENCE); unaccountedSpace.op(displayRegion, unaccountedSpace, Loading services/core/java/com/android/server/wm/DisplayContent.java +4 −1 Original line number Diff line number Diff line Loading @@ -2500,10 +2500,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo * @param inOutRegion The region to be amended. */ private void amendWindowTapExcludeRegion(Region inOutRegion) { final Region region = Region.obtain(); for (int i = mTapExcludeProvidingWindows.size() - 1; i >= 0; i--) { final WindowState win = mTapExcludeProvidingWindows.valueAt(i); win.amendTapExcludeRegion(inOutRegion); win.getTapExcludeRegion(region); inOutRegion.op(region, Op.UNION); } region.recycle(); } @Override Loading Loading
core/java/android/app/TaskEmbedder.java +5 −6 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ public class TaskEmbedder { return; } reportLocation(mHost.getScreenToTaskMatrix(), mHost.getPositionInWindow()); applyTapExcludeRegion(mHost.getWindow(), hashCode(), mHost.getTapExcludeRegion()); applyTapExcludeRegion(mHost.getWindow(), mHost.getTapExcludeRegion()); } /** Loading Loading @@ -458,13 +458,12 @@ public class TaskEmbedder { * {@link #updateLocationAndTapExcludeRegion()}. This method * is provided as an optimization when managing multiple TaskSurfaces within a view. * * @see IWindowSession#updateTapExcludeRegion(IWindow, int, Region) * @see IWindowSession#updateTapExcludeRegion(IWindow, Region) */ private void applyTapExcludeRegion(IWindow window, int regionId, @Nullable Region tapExcludeRegion) { private void applyTapExcludeRegion(IWindow window, @Nullable Region tapExcludeRegion) { try { IWindowSession session = WindowManagerGlobal.getWindowSession(); session.updateTapExcludeRegion(window, regionId, tapExcludeRegion); session.updateTapExcludeRegion(window, tapExcludeRegion); } catch (RemoteException e) { e.rethrowAsRuntimeException(); } Loading @@ -486,7 +485,7 @@ public class TaskEmbedder { Log.w(TAG, "clearTapExcludeRegion: not attached to window!"); return; } applyTapExcludeRegion(mHost.getWindow(), hashCode(), null); applyTapExcludeRegion(mHost.getWindow(), null); } /** Loading
core/java/android/view/IWindowSession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ interface IWindowSession { * will neither be dispatched to this window nor change the focus to this window. Passing an * invalid region will remove the area from the exclude region of this window. */ void updateTapExcludeRegion(IWindow window, int regionId, in Region region); void updateTapExcludeRegion(IWindow window, in Region region); /** * Called when the client has changed the local insets state, and now the server should reflect Loading
core/java/android/view/WindowlessWindowManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -336,7 +336,7 @@ public class WindowlessWindowManager implements IWindowSession { } @Override public void updateTapExcludeRegion(android.view.IWindow window, int regionId, public void updateTapExcludeRegion(android.view.IWindow window, android.graphics.Region region) { } Loading
services/core/java/com/android/server/wm/AccessibilityController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1309,7 +1309,7 @@ final class AccessibilityController { // If a window has tap exclude region, we need to account it. final Region displayRegion = new Region(windowState.getDisplayFrameLw()); final Region tapExcludeRegion = new Region(); windowState.amendTapExcludeRegion(tapExcludeRegion); windowState.getTapExcludeRegion(tapExcludeRegion); displayRegion.op(tapExcludeRegion, displayRegion, Region.Op.REVERSE_DIFFERENCE); unaccountedSpace.op(displayRegion, unaccountedSpace, Loading
services/core/java/com/android/server/wm/DisplayContent.java +4 −1 Original line number Diff line number Diff line Loading @@ -2500,10 +2500,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo * @param inOutRegion The region to be amended. */ private void amendWindowTapExcludeRegion(Region inOutRegion) { final Region region = Region.obtain(); for (int i = mTapExcludeProvidingWindows.size() - 1; i >= 0; i--) { final WindowState win = mTapExcludeProvidingWindows.valueAt(i); win.amendTapExcludeRegion(inOutRegion); win.getTapExcludeRegion(region); inOutRegion.op(region, Op.UNION); } region.recycle(); } @Override Loading