Use TYPE_ENTER_PIP_FROM_SPLIT only if the task is on split
Otherwise even if the split pair is in background, any standalone
entering PiP will always use TYPE_ENTER_PIP_FROM_SPLIT. That
may either disturb split state or notify some unexpected transition
handlers to run additional animation.
Bug: 286363453
Test: 1. Return to home from a split pair, the activity on the
split can enter PiP successfully.
2. Put a split pair in background, launch another
fullscreen activity and request entering PiP, the log
should not show:
"Got a PiP-enter request while Split-Screen is active".
Change-Id: I780d0bd22ba5e3992ad859e6f770033c1b4d6487
This commit is contained in:
@@ -24,6 +24,7 @@ import static android.view.WindowManager.TRANSIT_TO_BACK;
|
||||
import static android.window.TransitionInfo.FLAG_IS_WALLPAPER;
|
||||
|
||||
import static com.android.wm.shell.common.split.SplitScreenConstants.FLAG_IS_DIVIDER_BAR;
|
||||
import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED;
|
||||
import static com.android.wm.shell.splitscreen.SplitScreen.STAGE_TYPE_UNDEFINED;
|
||||
import static com.android.wm.shell.splitscreen.SplitScreenController.EXIT_REASON_CHILD_TASK_ENTER_PIP;
|
||||
import static com.android.wm.shell.util.TransitionUtil.isOpeningType;
|
||||
@@ -158,7 +159,9 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler,
|
||||
@Override
|
||||
public WindowContainerTransaction handleRequest(@NonNull IBinder transition,
|
||||
@NonNull TransitionRequestInfo request) {
|
||||
if (mPipHandler.requestHasPipEnter(request) && mSplitHandler.isSplitActive()) {
|
||||
if (mPipHandler.requestHasPipEnter(request) && mSplitHandler.isSplitActive()
|
||||
&& request.getTriggerTask() != null && mSplitHandler.getSplitItemPosition(
|
||||
request.getTriggerTask().token) != SPLIT_POSITION_UNDEFINED) {
|
||||
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Got a PiP-enter request while "
|
||||
+ "Split-Screen is active, so treat it as Mixed.");
|
||||
if (request.getRemoteTransition() != null) {
|
||||
|
||||
Reference in New Issue
Block a user