PiP Transition: Only allow TRANSIT_PIP and TRANSIT_OPEN types for enter animation.

Bug: 165793917
Test: Enable Shell transition, run flicker tests for PIP
Change-Id: Ia6c77a71ebfb443dd3d6e54dc3cd19df5780379f
This commit is contained in:
Ben Lin
2021-08-06 14:35:53 -07:00
parent fa8944c1a2
commit 7fb1c306a6

View File

@@ -19,6 +19,7 @@ package com.android.wm.shell.pip;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.util.RotationUtils.deltaRotation;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_PIP;
import static android.window.TransitionInfo.FLAG_IS_WALLPAPER;
@@ -126,6 +127,12 @@ public class PipTransition extends PipTransitionController {
return true;
}
// We only support TRANSIT_PIP type (from RootWindowContainer) or TRANSIT_OPEN (from apps
// that enter PiP instantly on opening, mostly from CTS/Flicker tests)
if (info.getType() != TRANSIT_PIP && info.getType() != TRANSIT_OPEN) {
return false;
}
// Search for an Enter PiP transition (along with a show wallpaper one)
TransitionInfo.Change enterPip = null;
TransitionInfo.Change wallpaper = null;