diff options
| author | 2024-03-21 16:32:30 -0700 | |
|---|---|---|
| committer | 2024-03-25 13:12:55 -0700 | |
| commit | 07711a6ca38bc2e686a40059586e2cc4a9351b6b (patch) | |
| tree | 567ce26f55347f7a17deeb1bf58c6bd37c9c36b9 /libs | |
| parent | d7f850e44917124f5232e53f5a7fd559c077c721 (diff) | |
Allow TRANSIT_TO_FRONT to enter PiP if needed
Make sure TO_FRONT transitions with a task change
in WINDOWING_MODE_PINNED are resolved as enter PiP
transitions to be handled by PipTransition handler.
Bug: 308054074
Test: use ag/26668330 CP to test for breakage fix
(instructions provided in that same WIP CL as well)
Change-Id: I5eda8d4a0e88428025c1151b06d8e6f337526ee7
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java index 6a1a62ea30a1..d60f5a631044 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java @@ -27,6 +27,7 @@ import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_PIP; import static android.view.WindowManager.TRANSIT_TO_BACK; +import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.transitTypeToString; import static android.window.TransitionInfo.FLAG_IS_DISPLAY; @@ -840,8 +841,11 @@ public class PipTransition extends PipTransitionController { && change.getTaskInfo().getWindowingMode() == WINDOWING_MODE_PINNED && !change.getContainer().equals(mCurrentPipTaskToken)) { // We support TRANSIT_PIP type (from RootWindowContainer) or TRANSIT_OPEN (from apps - // that enter PiP instantly on opening, mostly from CTS/Flicker tests) - if (transitType == TRANSIT_PIP || transitType == TRANSIT_OPEN) { + // that enter PiP instantly on opening, mostly from CTS/Flicker tests). + // TRANSIT_TO_FRONT, though uncommon with triggering PiP, should semantically also + // be allowed to animate if the task in question is pinned already - see b/308054074. + if (transitType == TRANSIT_PIP || transitType == TRANSIT_OPEN + || transitType == TRANSIT_TO_FRONT) { return true; } // This can happen if the request to enter PIP happens when we are collecting for |