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

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

Revert "No PiP position update when unlock"

This reverts commit 002e9353.

Reason for revert: b/424086448

Bug: 416299223
Bug: 424086448
Change-Id: I914c7306918b5941249f58c4d64afa7a46dfca5e
parent 002e9353
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.wm.shell.shared;

import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.view.RemoteAnimationTarget.MODE_CHANGING;
import static android.view.RemoteAnimationTarget.MODE_CLOSING;
import static android.view.RemoteAnimationTarget.MODE_OPENING;
@@ -125,12 +124,6 @@ public class TransitionUtil {
        return isNonApp(change) && change.hasFlags(FLAG_IS_DIVIDER_BAR);
    }

    /** Returns `true` if `change` is a pinned Task. */
    private static boolean isPipTask(TransitionInfo.Change change) {
        return change.getTaskInfo() != null
                && change.getTaskInfo().getWindowingMode() == WINDOWING_MODE_PINNED;
    }

    /** Returns `true` if `change` is an app's dim layer. */
    public static boolean isDimLayer(TransitionInfo.Change change) {
        return isNonApp(change) && change.hasFlags(FLAG_IS_DIM_LAYER);
@@ -317,10 +310,9 @@ public class TransitionUtil {
            // actual dim value).
            t.setAlpha(change.getLeash(), 1.0f);
        }
        if (!isDividerBar(change) && !isPipTask(change)) {
            // For certain components such as Divider and PiP, don't modify its inner leash
            // position when creating the outer leash for the transition. In case the position
            // being wrong after the transition finished.
        if (!isDividerBar(change)) {
            // For divider, don't modify its inner leash position when creating the outer leash
            // for the transition. In case the position being wrong after the transition finished.
            t.setPosition(change.getLeash(), 0, 0);
        }
        t.setLayer(change.getLeash(), 0);