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

Commit d9cd4703 authored by Ben Lin's avatar Ben Lin Committed by Automerger Merge Worker
Browse files

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

Merge "PiP Transition: Only allow TRANSIT_PIP and TRANSIT_OPEN types for enter animation." into sc-v2-dev am: 4c06d013 am: e92a883d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15484574

Change-Id: I6e2edc13227f0ab93aa34298d50d02c93514cf06
parents a5b76238 e92a883d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;