diff options
author | 2021-08-09 05:00:14 +0000 | |
---|---|---|
committer | 2021-08-09 05:00:14 +0000 | |
commit | d9cd47039f5524d21a5a6fd683bf760e5bbe667e (patch) | |
tree | 8d5483b064c1e0c33ca72f6b0c286dfc9c8a082b | |
parent | a5b76238a31898b99b4142bfce4ba78752d21814 (diff) | |
parent | e92a883d27879b168976fa805e6acbc5af998159 (diff) |
Merge "PiP Transition: Only allow TRANSIT_PIP and TRANSIT_OPEN types for enter animation." into sc-v2-dev am: 4c06d013b5 am: e92a883d27
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15484574
Change-Id: I6e2edc13227f0ab93aa34298d50d02c93514cf06
-rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java | 7 |
1 files changed, 7 insertions, 0 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 ae17a93ef1dc..ea587c69c0c0 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 @@ -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; |