Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblesNavBarGestureTracker.java +5 −4 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ class BubblesNavBarGestureTracker { private static final String GESTURE_MONITOR = "bubbles-gesture"; private final Context mContext; private final BubblePositioner mPositioner; private final InputManager mInputManager; @Nullable private InputMonitor mInputMonitor; Loading @@ -50,6 +51,7 @@ class BubblesNavBarGestureTracker { BubblesNavBarGestureTracker(Context context, BubblePositioner positioner) { mContext = context; mInputManager = mContext.getSystemService(InputManager.class); mPositioner = positioner; } Loading @@ -63,8 +65,7 @@ class BubblesNavBarGestureTracker { stopInternal(); mInputMonitor = mContext.getSystemService(InputManager.class) .monitorGestureInput(GESTURE_MONITOR, mContext.getDisplayId()); mInputMonitor = mInputManager.monitorGestureInput(GESTURE_MONITOR, mContext.getDisplayId()); InputChannel inputChannel = mInputMonitor.getInputChannel(); BubblesNavBarMotionEventHandler motionEventHandler = Loading Loading @@ -92,8 +93,8 @@ class BubblesNavBarGestureTracker { private void onInterceptTouch() { ProtoLog.d(WM_SHELL_BUBBLES, "intercept touch event"); if (mInputMonitor != null) { mInputMonitor.pilferPointers(); if (mInputEventReceiver != null) { mInputManager.pilferPointers(mInputEventReceiver.getToken()); } } } libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java +5 −5 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public class PipResizeGestureHandler { private static final float PINCH_RESIZE_AUTO_MAX_RATIO = 0.9f; private final Context mContext; private final InputManager mInputManager; private final PipBoundsAlgorithm mPipBoundsAlgorithm; private final PipMotionHelper mMotionHelper; private final PipBoundsState mPipBoundsState; Loading Loading @@ -136,6 +137,7 @@ public class PipResizeGestureHandler { PipUiEventLogger pipUiEventLogger, PhonePipMenuController menuActivityController, ShellExecutor mainExecutor, @Nullable PipPerfHintController pipPerfHintController) { mContext = context; mInputManager = mContext.getSystemService(InputManager.class); mDisplayId = context.getDisplayId(); mMainExecutor = mainExecutor; mPipPerfHintController = pipPerfHintController; Loading Loading @@ -227,8 +229,7 @@ public class PipResizeGestureHandler { if (mIsEnabled) { // Register input event receiver mInputMonitor = mContext.getSystemService(InputManager.class).monitorGestureInput( "pip-resize", mDisplayId); mInputMonitor = mInputManager.monitorGestureInput("pip-resize", mDisplayId); try { mMainExecutor.executeBlocking(() -> { mInputEventReceiver = new PipResizeInputEventReceiver( Loading Loading @@ -509,7 +510,7 @@ public class PipResizeGestureHandler { mThresholdCrossed = true; // Reset the down to begin resizing from this point mDownPoint.set(x, y); mInputMonitor.pilferPointers(); mInputManager.pilferPointers(mInputEventReceiver.getToken()); } if (mThresholdCrossed) { if (mPhonePipMenuController.isMenuVisible()) { Loading Loading @@ -637,10 +638,9 @@ public class PipResizeGestureHandler { @VisibleForTesting void pilferPointers() { mInputMonitor.pilferPointers(); mInputManager.pilferPointers(mInputEventReceiver.getToken()); } @VisibleForTesting public void updateMaxSize(int maxX, int maxY) { mMaxSize.set(maxX, maxY); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipResizeGestureHandler.java +4 −2 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public class PipResizeGestureHandler implements private static final String RESIZE_BOUNDS_CHANGE = "resize_bounds_change"; private Context mContext; private final InputManager mInputManager; private final PipBoundsAlgorithm mPipBoundsAlgorithm; private final PipBoundsState mPipBoundsState; private final PipTouchState mPipTouchState; Loading Loading @@ -133,6 +134,7 @@ public class PipResizeGestureHandler implements ShellExecutor mainExecutor, @Nullable PipPerfHintController pipPerfHintController) { mContext = context; mInputManager = mContext.getSystemService(InputManager.class); mSurfaceTransactionHelper = pipSurfaceTransactionHelper; mMainExecutor = mainExecutor; mPipPerfHintController = pipPerfHintController; Loading Loading @@ -213,7 +215,7 @@ public class PipResizeGestureHandler implements if (mIsEnabled) { // Register input event receiver mInputMonitor = mContext.getSystemService(InputManager.class).monitorGestureInput( mInputMonitor = mInputManager.monitorGestureInput( "pip-resize", mPipDisplayLayoutState.getDisplayId()); try { mMainExecutor.executeBlocking(() -> { Loading Loading @@ -476,7 +478,7 @@ public class PipResizeGestureHandler implements @VisibleForTesting void pilferPointers() { mInputMonitor.pilferPointers(); mInputManager.pilferPointers(mInputEventReceiver.getToken()); } void setOhmOffset(int offset) { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblesNavBarGestureTracker.java +5 −4 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ class BubblesNavBarGestureTracker { private static final String GESTURE_MONITOR = "bubbles-gesture"; private final Context mContext; private final BubblePositioner mPositioner; private final InputManager mInputManager; @Nullable private InputMonitor mInputMonitor; Loading @@ -50,6 +51,7 @@ class BubblesNavBarGestureTracker { BubblesNavBarGestureTracker(Context context, BubblePositioner positioner) { mContext = context; mInputManager = mContext.getSystemService(InputManager.class); mPositioner = positioner; } Loading @@ -63,8 +65,7 @@ class BubblesNavBarGestureTracker { stopInternal(); mInputMonitor = mContext.getSystemService(InputManager.class) .monitorGestureInput(GESTURE_MONITOR, mContext.getDisplayId()); mInputMonitor = mInputManager.monitorGestureInput(GESTURE_MONITOR, mContext.getDisplayId()); InputChannel inputChannel = mInputMonitor.getInputChannel(); BubblesNavBarMotionEventHandler motionEventHandler = Loading Loading @@ -92,8 +93,8 @@ class BubblesNavBarGestureTracker { private void onInterceptTouch() { ProtoLog.d(WM_SHELL_BUBBLES, "intercept touch event"); if (mInputMonitor != null) { mInputMonitor.pilferPointers(); if (mInputEventReceiver != null) { mInputManager.pilferPointers(mInputEventReceiver.getToken()); } } }
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java +5 −5 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public class PipResizeGestureHandler { private static final float PINCH_RESIZE_AUTO_MAX_RATIO = 0.9f; private final Context mContext; private final InputManager mInputManager; private final PipBoundsAlgorithm mPipBoundsAlgorithm; private final PipMotionHelper mMotionHelper; private final PipBoundsState mPipBoundsState; Loading Loading @@ -136,6 +137,7 @@ public class PipResizeGestureHandler { PipUiEventLogger pipUiEventLogger, PhonePipMenuController menuActivityController, ShellExecutor mainExecutor, @Nullable PipPerfHintController pipPerfHintController) { mContext = context; mInputManager = mContext.getSystemService(InputManager.class); mDisplayId = context.getDisplayId(); mMainExecutor = mainExecutor; mPipPerfHintController = pipPerfHintController; Loading Loading @@ -227,8 +229,7 @@ public class PipResizeGestureHandler { if (mIsEnabled) { // Register input event receiver mInputMonitor = mContext.getSystemService(InputManager.class).monitorGestureInput( "pip-resize", mDisplayId); mInputMonitor = mInputManager.monitorGestureInput("pip-resize", mDisplayId); try { mMainExecutor.executeBlocking(() -> { mInputEventReceiver = new PipResizeInputEventReceiver( Loading Loading @@ -509,7 +510,7 @@ public class PipResizeGestureHandler { mThresholdCrossed = true; // Reset the down to begin resizing from this point mDownPoint.set(x, y); mInputMonitor.pilferPointers(); mInputManager.pilferPointers(mInputEventReceiver.getToken()); } if (mThresholdCrossed) { if (mPhonePipMenuController.isMenuVisible()) { Loading Loading @@ -637,10 +638,9 @@ public class PipResizeGestureHandler { @VisibleForTesting void pilferPointers() { mInputMonitor.pilferPointers(); mInputManager.pilferPointers(mInputEventReceiver.getToken()); } @VisibleForTesting public void updateMaxSize(int maxX, int maxY) { mMaxSize.set(maxX, maxY); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipResizeGestureHandler.java +4 −2 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public class PipResizeGestureHandler implements private static final String RESIZE_BOUNDS_CHANGE = "resize_bounds_change"; private Context mContext; private final InputManager mInputManager; private final PipBoundsAlgorithm mPipBoundsAlgorithm; private final PipBoundsState mPipBoundsState; private final PipTouchState mPipTouchState; Loading Loading @@ -133,6 +134,7 @@ public class PipResizeGestureHandler implements ShellExecutor mainExecutor, @Nullable PipPerfHintController pipPerfHintController) { mContext = context; mInputManager = mContext.getSystemService(InputManager.class); mSurfaceTransactionHelper = pipSurfaceTransactionHelper; mMainExecutor = mainExecutor; mPipPerfHintController = pipPerfHintController; Loading Loading @@ -213,7 +215,7 @@ public class PipResizeGestureHandler implements if (mIsEnabled) { // Register input event receiver mInputMonitor = mContext.getSystemService(InputManager.class).monitorGestureInput( mInputMonitor = mInputManager.monitorGestureInput( "pip-resize", mPipDisplayLayoutState.getDisplayId()); try { mMainExecutor.executeBlocking(() -> { Loading Loading @@ -476,7 +478,7 @@ public class PipResizeGestureHandler implements @VisibleForTesting void pilferPointers() { mInputMonitor.pilferPointers(); mInputManager.pilferPointers(mInputEventReceiver.getToken()); } void setOhmOffset(int offset) { Loading