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

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

Merge "Check for existing dimming before stop dimming."

parents 3bf928d5 f8d4fbb9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ public class WindowAnimator {
                mDimAnimator.updateParameters(mContext.getResources(), mDimParams, mCurrentTime);
            }
            if (mDimAnimator != null && mDimAnimator.mDimShown) {
                mAnimating |= mDimAnimator.updateSurface(mDimParams != null, mCurrentTime,
                mAnimating |= mDimAnimator.updateSurface(isDimming(), mCurrentTime,
                        !mService.okToDisplay());
            }

@@ -501,6 +501,10 @@ public class WindowAnimator {
        mService.mH.sendMessage(mService.mH.obtainMessage(SET_DIM_PARAMETERS, null));
    }

    boolean isDimming() {
        return mDimParams != null;
    }

    public void dump(PrintWriter pw, String prefix, boolean dumpAll) {
        if (mWindowDetachedWallpaper != null) {
            pw.print("  mWindowDetachedWallpaper="); pw.println(mWindowDetachedWallpaper);
+12 −10
Original line number Diff line number Diff line
@@ -8021,6 +8021,7 @@ public class WindowManagerService extends IWindowManager.Stub
            if (!mInnerFields.mDimming) {
                //Slog.i(TAG, "DIM BEHIND: " + w);
                mInnerFields.mDimming = true;
                if (!mAnimator.isDimming()) {
                    final int width, height;
                    if (attrs.type == WindowManager.LayoutParams.TYPE_BOOT_PROGRESS) {
                        width = mCurDisplayWidth;
@@ -8034,6 +8035,7 @@ public class WindowManagerService extends IWindowManager.Stub
                }
            }
        }
    }

    // "Something has changed!  Let's make it correct now."
    private final void performLayoutAndPlaceSurfacesLockedInner(
@@ -8180,7 +8182,7 @@ public class WindowManagerService extends IWindowManager.Stub
                    updateWallpaperVisibilityLocked();
                }
            }
            if (!mInnerFields.mDimming && mAnimator.mDimParams != null) {
            if (!mInnerFields.mDimming && mAnimator.isDimming()) {
                mAnimator.stopDimming();
            }
        } catch (RuntimeException e) {