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

Commit 114b422d authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Put safeguard in dismissPip" into rvc-dev

parents 2a4de9cf 1273c953
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -238,6 +238,11 @@ public class PipTaskOrganizer extends TaskOrganizer {
     * @param animationDurationMs duration in millisecond for the exiting PiP transition
     */
    public void dismissPip(int animationDurationMs) {
        if (!mInPip || mToken == null) {
            Log.wtf(TAG, "Not allowed to dismissPip in current state"
                    + " mInPip=" + mInPip + " mToken=" + mToken);
            return;
        }
        final WindowContainerTransaction wct = new WindowContainerTransaction();
        wct.setActivityWindowingMode(mToken, WINDOWING_MODE_UNDEFINED);
        WindowOrganizer.applyTransaction(wct);