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

Commit f9ca3993 authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "Fix crash on invalid dimlayer"

parents 40725b6f eb917324
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1355,6 +1355,14 @@ final class WindowState implements WindowManagerPolicy.WindowState {
    }

    void applyDimLayerIfNeeded() {
        // When the app is terminated (eg. from Recents), the task might have already been
        // removed with the window pending removal. Don't apply dim in such cases, as there
        // will be no more updateDimLayer() calls, which leaves the dimlayer invalid.
        final AppWindowToken token = mAppToken;
        if (token != null && token.removed) {
            return;
        }

        if (!mExiting && mAppDied) {
            // If app died visible, apply a dim over the window to indicate that it's inactive
            mDisplayContent.mDimLayerController.applyDimAbove(getDimLayerUser(), mWinAnimator);