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

Commit e6f2974a authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

Merge "Fix crash while animating removed stack" into qt-dev am: f8b534a8 am: 7216f80e

am: 0282a445

Change-Id: I11916e0d154edb569b5cc6611a7026f5b4230421
parents 72f48df5 0282a445
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1931,8 +1931,12 @@ public class TaskStack extends WindowContainer<Task> implements
    public boolean setPinnedStackAlpha(float alpha) {
        // Hold the lock since this is called from the BoundsAnimator running on the UiThread
        synchronized (mWmService.mGlobalLock) {
            getPendingTransaction().setAlpha(getSurfaceControl(),
                    mCancelCurrentBoundsAnimation ? 1 : alpha);
            final SurfaceControl sc = getSurfaceControl();
            if (sc == null || !sc.isValid()) {
                // If the stack is already removed, don't bother updating any stack animation
                return false;
            }
            getPendingTransaction().setAlpha(sc, mCancelCurrentBoundsAnimation ? 1 : alpha);
            scheduleAnimation();
            return !mCancelCurrentBoundsAnimation;
        }