Loading services/core/java/com/android/server/input/GestureMonitorSpyWindow.java +5 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import android.view.InputWindowHandle; import android.view.SurfaceControl; import android.view.WindowManager; import com.android.server.policy.WindowManagerPolicy; /** * An internal implementation of an {@link InputMonitor} that uses a spy window. * Loading Loading @@ -67,7 +69,9 @@ class GestureMonitorSpyWindow { final SurfaceControl.Transaction t = new SurfaceControl.Transaction(); t.setInputWindowInfo(mInputSurface, mWindowHandle); t.setLayer(mInputSurface, Integer.MAX_VALUE); // Gesture monitor should be above handwriting event surface, hence setting it to // WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER + 1 t.setLayer(mInputSurface, WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER + 1); t.setPosition(mInputSurface, 0, 0); t.setCrop(mInputSurface, null /* crop to parent surface */); t.show(mInputSurface); Loading services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java +4 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import android.view.InputWindowHandle; import android.view.SurfaceControl; import android.view.WindowManager; import com.android.server.policy.WindowManagerPolicy; final class HandwritingEventReceiverSurface { public static final String TAG = HandwritingEventReceiverSurface.class.getSimpleName(); Loading @@ -36,7 +38,8 @@ final class HandwritingEventReceiverSurface { // is above gesture monitors, then edge-back and swipe-up gestures won't work when this surface // is intercepting. // TODO(b/217538817): Specify the ordering in WM by usage. private static final int HANDWRITING_SURFACE_LAYER = Integer.MAX_VALUE - 1; private static final int HANDWRITING_SURFACE_LAYER = WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER; private final InputWindowHandle mWindowHandle; private final InputChannel mClientChannel; Loading services/core/java/com/android/server/policy/WindowManagerPolicy.java +4 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { int FINISH_LAYOUT_REDO_ANIM = 0x0008; /** Layer for the screen off animation */ int COLOR_FADE_LAYER = 0x40000001; /** Layer for Input overlays for capturing inputs for gesture detection, etc. */ int INPUT_DISPLAY_OVERLAY_LAYER = 0x7f000000; /** Layer for Screen Decoration: The top most visible layer just below input overlay layers */ int SCREEN_DECOR_DISPLAY_OVERLAY_LAYER = INPUT_DISPLAY_OVERLAY_LAYER - 1; /** * Register shortcuts for window manager to dispatch. Loading services/core/java/com/android/server/wm/DisplayContent.java +10 −0 Original line number Diff line number Diff line Loading @@ -5392,6 +5392,16 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp return mOverlayLayer; } SurfaceControl[] findRoundedCornerOverlays() { List<SurfaceControl> roundedCornerOverlays = new ArrayList<>(); for (WindowToken token : mTokenMap.values()) { if (token.mRoundedCornerOverlay) { roundedCornerOverlays.add(token.mSurfaceControl); } } return roundedCornerOverlays.toArray(new SurfaceControl[0]); } /** * Updates the display's system gesture exclusion. * Loading services/core/java/com/android/server/wm/InputManagerCallback.java +1 −1 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ final class InputManagerCallback implements InputManagerService.WindowManagerCal .setContainerLayer() .setName(name) .setCallsite("createSurfaceForGestureMonitor") .setParent(dc.getSurfaceControl()) .setParent(dc.getOverlayLayer()) .build(); } } Loading Loading
services/core/java/com/android/server/input/GestureMonitorSpyWindow.java +5 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import android.view.InputWindowHandle; import android.view.SurfaceControl; import android.view.WindowManager; import com.android.server.policy.WindowManagerPolicy; /** * An internal implementation of an {@link InputMonitor} that uses a spy window. * Loading Loading @@ -67,7 +69,9 @@ class GestureMonitorSpyWindow { final SurfaceControl.Transaction t = new SurfaceControl.Transaction(); t.setInputWindowInfo(mInputSurface, mWindowHandle); t.setLayer(mInputSurface, Integer.MAX_VALUE); // Gesture monitor should be above handwriting event surface, hence setting it to // WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER + 1 t.setLayer(mInputSurface, WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER + 1); t.setPosition(mInputSurface, 0, 0); t.setCrop(mInputSurface, null /* crop to parent surface */); t.show(mInputSurface); Loading
services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java +4 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ import android.view.InputWindowHandle; import android.view.SurfaceControl; import android.view.WindowManager; import com.android.server.policy.WindowManagerPolicy; final class HandwritingEventReceiverSurface { public static final String TAG = HandwritingEventReceiverSurface.class.getSimpleName(); Loading @@ -36,7 +38,8 @@ final class HandwritingEventReceiverSurface { // is above gesture monitors, then edge-back and swipe-up gestures won't work when this surface // is intercepting. // TODO(b/217538817): Specify the ordering in WM by usage. private static final int HANDWRITING_SURFACE_LAYER = Integer.MAX_VALUE - 1; private static final int HANDWRITING_SURFACE_LAYER = WindowManagerPolicy.INPUT_DISPLAY_OVERLAY_LAYER; private final InputWindowHandle mWindowHandle; private final InputChannel mClientChannel; Loading
services/core/java/com/android/server/policy/WindowManagerPolicy.java +4 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { int FINISH_LAYOUT_REDO_ANIM = 0x0008; /** Layer for the screen off animation */ int COLOR_FADE_LAYER = 0x40000001; /** Layer for Input overlays for capturing inputs for gesture detection, etc. */ int INPUT_DISPLAY_OVERLAY_LAYER = 0x7f000000; /** Layer for Screen Decoration: The top most visible layer just below input overlay layers */ int SCREEN_DECOR_DISPLAY_OVERLAY_LAYER = INPUT_DISPLAY_OVERLAY_LAYER - 1; /** * Register shortcuts for window manager to dispatch. Loading
services/core/java/com/android/server/wm/DisplayContent.java +10 −0 Original line number Diff line number Diff line Loading @@ -5392,6 +5392,16 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp return mOverlayLayer; } SurfaceControl[] findRoundedCornerOverlays() { List<SurfaceControl> roundedCornerOverlays = new ArrayList<>(); for (WindowToken token : mTokenMap.values()) { if (token.mRoundedCornerOverlay) { roundedCornerOverlays.add(token.mSurfaceControl); } } return roundedCornerOverlays.toArray(new SurfaceControl[0]); } /** * Updates the display's system gesture exclusion. * Loading
services/core/java/com/android/server/wm/InputManagerCallback.java +1 −1 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ final class InputManagerCallback implements InputManagerService.WindowManagerCal .setContainerLayer() .setName(name) .setCallsite("createSurfaceForGestureMonitor") .setParent(dc.getSurfaceControl()) .setParent(dc.getOverlayLayer()) .build(); } } Loading