Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +18 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,24 @@ public class PipMenuActivity extends Activity { showMenu(); } @Override protected void onUserLeaveHint() { super.onUserLeaveHint(); // If another task is starting on top of the menu, then finish it so that it can be // recreated on the top next time it starts finish(); } @Override protected void onDestroy() { super.onDestroy(); // Fallback, if we are destroyed for any other reason (like when the task is being reset), // also reset the callback. notifyActivityCallback(null); } @Override public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) { if (!isInPictureInPictureMode) { Loading services/core/java/com/android/server/wm/InputMonitor.java +20 −14 Original line number Diff line number Diff line Loading @@ -631,15 +631,27 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { return; } final int flags = w.mAttrs.flags; final int privateFlags = w.mAttrs.privateFlags; final int type = w.mAttrs.type; final boolean hasFocus = w == mInputFocus; final boolean isVisible = w.isVisibleLw(); if (w.getStackId() == PINNED_STACK_ID) { if (mAddPipInputConsumerHandle && w.getStackId() == PINNED_STACK_ID && inputWindowHandle.layer <= pipInputConsumer.mWindowHandle.layer) { && (inputWindowHandle.layer <= pipInputConsumer.mWindowHandle.layer)) { // Update the bounds of the Pip input consumer to match the Pinned stack w.getStack().getBounds(pipTouchableBounds); pipInputConsumer.mWindowHandle.touchableRegion.set(pipTouchableBounds); addInputWindowHandle(pipInputConsumer.mWindowHandle); mAddPipInputConsumerHandle = false; } // TODO: Fix w.canReceiveTouchInput() to handle this case if (!hasFocus) { // Skip this pinned stack window if it does not have focus return; } } if (mAddInputConsumerHandle && inputWindowHandle.layer <= navInputConsumer.mWindowHandle.layer) { Loading @@ -655,12 +667,6 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { } } final int flags = w.mAttrs.flags; final int privateFlags = w.mAttrs.privateFlags; final int type = w.mAttrs.type; final boolean hasFocus = w == mInputFocus; final boolean isVisible = w.isVisibleLw(); if ((privateFlags & PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS) != 0) { mDisableWallpaperTouchEvents = true; } Loading Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +18 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,24 @@ public class PipMenuActivity extends Activity { showMenu(); } @Override protected void onUserLeaveHint() { super.onUserLeaveHint(); // If another task is starting on top of the menu, then finish it so that it can be // recreated on the top next time it starts finish(); } @Override protected void onDestroy() { super.onDestroy(); // Fallback, if we are destroyed for any other reason (like when the task is being reset), // also reset the callback. notifyActivityCallback(null); } @Override public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) { if (!isInPictureInPictureMode) { Loading
services/core/java/com/android/server/wm/InputMonitor.java +20 −14 Original line number Diff line number Diff line Loading @@ -631,15 +631,27 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { return; } final int flags = w.mAttrs.flags; final int privateFlags = w.mAttrs.privateFlags; final int type = w.mAttrs.type; final boolean hasFocus = w == mInputFocus; final boolean isVisible = w.isVisibleLw(); if (w.getStackId() == PINNED_STACK_ID) { if (mAddPipInputConsumerHandle && w.getStackId() == PINNED_STACK_ID && inputWindowHandle.layer <= pipInputConsumer.mWindowHandle.layer) { && (inputWindowHandle.layer <= pipInputConsumer.mWindowHandle.layer)) { // Update the bounds of the Pip input consumer to match the Pinned stack w.getStack().getBounds(pipTouchableBounds); pipInputConsumer.mWindowHandle.touchableRegion.set(pipTouchableBounds); addInputWindowHandle(pipInputConsumer.mWindowHandle); mAddPipInputConsumerHandle = false; } // TODO: Fix w.canReceiveTouchInput() to handle this case if (!hasFocus) { // Skip this pinned stack window if it does not have focus return; } } if (mAddInputConsumerHandle && inputWindowHandle.layer <= navInputConsumer.mWindowHandle.layer) { Loading @@ -655,12 +667,6 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { } } final int flags = w.mAttrs.flags; final int privateFlags = w.mAttrs.privateFlags; final int type = w.mAttrs.type; final boolean hasFocus = w == mInputFocus; final boolean isVisible = w.isVisibleLw(); if ((privateFlags & PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS) != 0) { mDisableWallpaperTouchEvents = true; } Loading