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

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

Merge "Revert "No PiP position update when unlock"" into main

parents 5be0bbea 191d1abe
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);