Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java +5 −3 Original line number Diff line number Diff line Loading @@ -413,6 +413,8 @@ public class PipTouchHandler { break; } case MotionEvent.ACTION_HOVER_ENTER: mMenuController.showMenu(MENU_STATE_FULL, mMotionHelper.getBounds(), mMovementBounds, false /* allowMenuTimeout */, false /* willResizeMenu */); case MotionEvent.ACTION_HOVER_MOVE: { if (!shouldDeliverToMenu && !mSendingHoverAccessibilityEvents) { sendAccessibilityHoverEvent(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER); Loading @@ -421,6 +423,7 @@ public class PipTouchHandler { break; } case MotionEvent.ACTION_HOVER_EXIT: { mMenuController.hideMenu(); if (!shouldDeliverToMenu && mSendingHoverAccessibilityEvents) { sendAccessibilityHoverEvent(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT); mSendingHoverAccessibilityEvents = false; Loading Loading @@ -538,9 +541,6 @@ public class PipTouchHandler { mSavedSnapFraction = -1f; } } else { // If resizing is not allowed, then the PiP should be frozen until the transition // ends as well setTouchEnabled(false); mSavedSnapFraction = -1f; } } Loading Loading @@ -714,6 +714,8 @@ public class PipTouchHandler { } } else if (mTouchState.isDoubleTap()) { // Expand to fullscreen if this is a double tap // the PiP should be frozen until the transition ends setTouchEnabled(false); mMotionHelper.expandPip(); } else if (mMenuState != MENU_STATE_FULL) { if (!mTouchState.isWaitingForDoubleTap()) { Loading services/core/java/com/android/server/wm/InputConsumerImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,10 @@ class InputConsumerImpl implements IBinder.DeathRecipient { t.setLayer(mInputSurface, layer); } void reparent(SurfaceControl.Transaction t, WindowContainer wc) { t.reparent(mInputSurface, wc.getSurfaceControl()); } void disposeChannelsLw() { mService.mInputManager.unregisterInputChannel(mServerChannel); mClientChannel.dispose(); Loading services/core/java/com/android/server/wm/InputMonitor.java +7 −8 Original line number Diff line number Diff line Loading @@ -511,14 +511,13 @@ final class InputMonitor { if (w.inPinnedWindowingMode()) { if (mAddPipInputConsumerHandle) { // Update the bounds of the Pip input consumer to match the window bounds. w.getBounds(mTmpRect); mPipInputConsumer.layout(mInputTransaction, mTmpRect); // The touchable region is relative to the surface top-left mTmpRect.offsetTo(0, 0); mPipInputConsumer.mWindowHandle.touchableRegion.set(mTmpRect); mPipInputConsumer.show(mInputTransaction, w); final Task rootTask = w.getTask().getRootTask(); mPipInputConsumer.mWindowHandle.replaceTouchableRegionWithCrop( rootTask.getSurfaceControl()); // We set the layer to z=MAX-1 so that it's always on top. mPipInputConsumer.reparent(mInputTransaction, rootTask); mPipInputConsumer.show(mInputTransaction, Integer.MAX_VALUE - 1); mAddPipInputConsumerHandle = false; } } Loading Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java +5 −3 Original line number Diff line number Diff line Loading @@ -413,6 +413,8 @@ public class PipTouchHandler { break; } case MotionEvent.ACTION_HOVER_ENTER: mMenuController.showMenu(MENU_STATE_FULL, mMotionHelper.getBounds(), mMovementBounds, false /* allowMenuTimeout */, false /* willResizeMenu */); case MotionEvent.ACTION_HOVER_MOVE: { if (!shouldDeliverToMenu && !mSendingHoverAccessibilityEvents) { sendAccessibilityHoverEvent(AccessibilityEvent.TYPE_VIEW_HOVER_ENTER); Loading @@ -421,6 +423,7 @@ public class PipTouchHandler { break; } case MotionEvent.ACTION_HOVER_EXIT: { mMenuController.hideMenu(); if (!shouldDeliverToMenu && mSendingHoverAccessibilityEvents) { sendAccessibilityHoverEvent(AccessibilityEvent.TYPE_VIEW_HOVER_EXIT); mSendingHoverAccessibilityEvents = false; Loading Loading @@ -538,9 +541,6 @@ public class PipTouchHandler { mSavedSnapFraction = -1f; } } else { // If resizing is not allowed, then the PiP should be frozen until the transition // ends as well setTouchEnabled(false); mSavedSnapFraction = -1f; } } Loading Loading @@ -714,6 +714,8 @@ public class PipTouchHandler { } } else if (mTouchState.isDoubleTap()) { // Expand to fullscreen if this is a double tap // the PiP should be frozen until the transition ends setTouchEnabled(false); mMotionHelper.expandPip(); } else if (mMenuState != MENU_STATE_FULL) { if (!mTouchState.isWaitingForDoubleTap()) { Loading
services/core/java/com/android/server/wm/InputConsumerImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,10 @@ class InputConsumerImpl implements IBinder.DeathRecipient { t.setLayer(mInputSurface, layer); } void reparent(SurfaceControl.Transaction t, WindowContainer wc) { t.reparent(mInputSurface, wc.getSurfaceControl()); } void disposeChannelsLw() { mService.mInputManager.unregisterInputChannel(mServerChannel); mClientChannel.dispose(); Loading
services/core/java/com/android/server/wm/InputMonitor.java +7 −8 Original line number Diff line number Diff line Loading @@ -511,14 +511,13 @@ final class InputMonitor { if (w.inPinnedWindowingMode()) { if (mAddPipInputConsumerHandle) { // Update the bounds of the Pip input consumer to match the window bounds. w.getBounds(mTmpRect); mPipInputConsumer.layout(mInputTransaction, mTmpRect); // The touchable region is relative to the surface top-left mTmpRect.offsetTo(0, 0); mPipInputConsumer.mWindowHandle.touchableRegion.set(mTmpRect); mPipInputConsumer.show(mInputTransaction, w); final Task rootTask = w.getTask().getRootTask(); mPipInputConsumer.mWindowHandle.replaceTouchableRegionWithCrop( rootTask.getSurfaceControl()); // We set the layer to z=MAX-1 so that it's always on top. mPipInputConsumer.reparent(mInputTransaction, rootTask); mPipInputConsumer.show(mInputTransaction, Integer.MAX_VALUE - 1); mAddPipInputConsumerHandle = false; } } Loading