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

Commit 20d97e1c authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Add null checks to WindowState.getStack() calls." into lmp-dev

parents 68ab6cf0 41a7b791
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -458,7 +458,10 @@ public class WindowAnimator {
                    }
                    final int color = winAnimator.mAnimation.getBackgroundColor();
                    if (color != 0) {
                        win.getStack().setAnimationBackground(winAnimator, color);
                        final TaskStack stack = win.getStack();
                        if (stack != null) {
                            stack.setAnimationBackground(winAnimator, color);
                        }
                    }
                }
                mAnimating = true;
@@ -477,7 +480,10 @@ public class WindowAnimator {

                final int color = appAnimator.animation.getBackgroundColor();
                if (color != 0) {
                    win.getStack().setAnimationBackground(winAnimator, color);
                    final TaskStack stack = win.getStack();
                    if (stack != null) {
                        stack.setAnimationBackground(winAnimator, color);
                    }
                }
            }
        } // end forall windows
+5 −1
Original line number Diff line number Diff line
@@ -8556,7 +8556,8 @@ public class WindowManagerService extends IWindowManager.Stub
                layerChanged = true;
                anyLayerChanged = true;
            }
            if (layerChanged && w.getStack().isDimming(winAnimator)) {
            final TaskStack stack = w.getStack();
            if (layerChanged && stack != null && stack.isDimming(winAnimator)) {
                // Force an animation pass just to update the mDimLayer layer.
                scheduleAnimationLocked();
            }
@@ -9380,6 +9381,9 @@ public class WindowManagerService extends IWindowManager.Stub
                && !w.mExiting) {
            final WindowStateAnimator winAnimator = w.mWinAnimator;
            final TaskStack stack = w.getStack();
            if (stack == null) {
                return;
            }
            stack.setDimmingTag();
            if (!stack.isDimming(winAnimator)) {
                if (localLOGV) Slog.v(TAG, "Win " + w + " start dimming.");
+4 −1
Original line number Diff line number Diff line
@@ -1368,7 +1368,10 @@ class WindowStateAnimator {
                mAnimator.setPendingLayoutChanges(w.getDisplayId(),
                        WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER);
                if ((w.mAttrs.flags & LayoutParams.FLAG_DIM_BEHIND) != 0) {
                    w.getStack().startDimmingIfNeeded(this);
                    final TaskStack stack = w.getStack();
                    if (stack != null) {
                        stack.startDimmingIfNeeded(this);
                    }
                }
            } catch (RuntimeException e) {
                // If something goes wrong with the surface (such