Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 989714b1 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Do not expand PiP upon lock screen open

This is a counterpart of what's in PiP1:

When tapping on the lock screen notification posted by an Activity in
PiP mode, do not try to expand it to full-screen mode.

Flag: com.android.wm.shell.enable_pip2
Bug: 399521216
video: http://recall/-/aaaaaabFQoRHlzixHdtY/cZqtGRRLtuv5UliDil1VJZ
Test: Follow the reproduce steps in bug, see also the Video
Change-Id: Id90701f31ba488ea7ced5f8e002222ab7019ca14
parent db072d38
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -238,7 +238,10 @@ public class PipController implements ConfigurationChangeListener,
            @Override
            public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task,
                    boolean homeTaskVisible, boolean clearedTask, boolean wasVisible) {
                if (task.getWindowingMode() != WINDOWING_MODE_PINNED) {
                ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                        "onActivityRestartAttempt: topActivity=%s, wasVisible=%b",
                        task.topActivity, wasVisible);
                if (task.getWindowingMode() != WINDOWING_MODE_PINNED || !wasVisible) {
                    return;
                }
                mPipScheduler.scheduleExitPipViaExpand();