Loading services/core/java/com/android/server/wm/InputMonitor.java +4 −3 Original line number Diff line number Diff line Loading @@ -326,11 +326,12 @@ final class InputMonitor { // the surface hierarchy. // TODO(b/168252846): we have some issues with modal-windows, so we need to cross // that bridge now that we organize full-screen Tasks. inputWindowHandle.replaceTouchableRegionWithCrop(null /* Use this surfaces crop */); inputWindowHandle.setTouchableRegionCrop(null /* Use this surfaces crop */); inputWindowHandle.setReplaceTouchableRegionWithCrop(true); useSurfaceCrop = true; } else if (task.cropWindowsToStackBounds() && !w.inFreeformWindowingMode()) { inputWindowHandle.replaceTouchableRegionWithCrop( task.getRootTask().getSurfaceControl()); inputWindowHandle.setTouchableRegionCrop(task.getRootTask().getSurfaceControl()); inputWindowHandle.setReplaceTouchableRegionWithCrop(false); useSurfaceCrop = true; } } Loading services/core/java/com/android/server/wm/InputWindowHandleWrapper.java +0 −5 Original line number Diff line number Diff line Loading @@ -255,11 +255,6 @@ class InputWindowHandleWrapper { mChanged = true; } void replaceTouchableRegionWithCrop(@Nullable SurfaceControl bounds) { setTouchableRegionCrop(bounds); setReplaceTouchableRegionWithCrop(true); } void setTouchableRegionCrop(@Nullable SurfaceControl bounds) { if (mHandle.touchableRegionSurfaceControl.get() == bounds) { return; Loading services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -694,6 +694,8 @@ public class WindowStateTests extends WindowTestsBase { mDisplayContent.getInputMonitor().populateInputWindowHandle(handleWrapper, win); assertTrue(handleWrapper.isChanged()); // The window of standard resizable task should not use surface crop as touchable region. assertFalse(handle.replaceTouchableRegionWithCrop); assertEquals(inputChannelToken, handle.token); assertEquals(win.mActivityRecord.getInputApplicationHandle(false /* update */), handle.inputApplicationHandle); Loading Loading
services/core/java/com/android/server/wm/InputMonitor.java +4 −3 Original line number Diff line number Diff line Loading @@ -326,11 +326,12 @@ final class InputMonitor { // the surface hierarchy. // TODO(b/168252846): we have some issues with modal-windows, so we need to cross // that bridge now that we organize full-screen Tasks. inputWindowHandle.replaceTouchableRegionWithCrop(null /* Use this surfaces crop */); inputWindowHandle.setTouchableRegionCrop(null /* Use this surfaces crop */); inputWindowHandle.setReplaceTouchableRegionWithCrop(true); useSurfaceCrop = true; } else if (task.cropWindowsToStackBounds() && !w.inFreeformWindowingMode()) { inputWindowHandle.replaceTouchableRegionWithCrop( task.getRootTask().getSurfaceControl()); inputWindowHandle.setTouchableRegionCrop(task.getRootTask().getSurfaceControl()); inputWindowHandle.setReplaceTouchableRegionWithCrop(false); useSurfaceCrop = true; } } Loading
services/core/java/com/android/server/wm/InputWindowHandleWrapper.java +0 −5 Original line number Diff line number Diff line Loading @@ -255,11 +255,6 @@ class InputWindowHandleWrapper { mChanged = true; } void replaceTouchableRegionWithCrop(@Nullable SurfaceControl bounds) { setTouchableRegionCrop(bounds); setReplaceTouchableRegionWithCrop(true); } void setTouchableRegionCrop(@Nullable SurfaceControl bounds) { if (mHandle.touchableRegionSurfaceControl.get() == bounds) { return; Loading
services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +2 −0 Original line number Diff line number Diff line Loading @@ -694,6 +694,8 @@ public class WindowStateTests extends WindowTestsBase { mDisplayContent.getInputMonitor().populateInputWindowHandle(handleWrapper, win); assertTrue(handleWrapper.isChanged()); // The window of standard resizable task should not use surface crop as touchable region. assertFalse(handle.replaceTouchableRegionWithCrop); assertEquals(inputChannelToken, handle.token); assertEquals(win.mActivityRecord.getInputApplicationHandle(false /* update */), handle.inputApplicationHandle); Loading