Skip to content

Commit 030711c

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Fix looping to turn off dimming."
2 parents 9a5acaf + 6af9b92 commit 030711c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

services/java/com/android/server/wm/WindowAnimator.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,12 @@ void animate() {
440440
w.mWinAnimator.prepareSurfaceLocked(true);
441441
}
442442

443+
if (mDimParams != null) {
444+
mDimAnimator.updateParameters(mContext.getResources(), mDimParams, mCurrentTime);
445+
}
443446
if (mDimAnimator != null && mDimAnimator.mDimShown) {
444-
mAnimating |= mDimAnimator.updateSurface(mService.mInnerFields.mDimming,
445-
mCurrentTime, !mService.okToDisplay());
447+
mAnimating |= mDimAnimator.updateSurface(mDimParams != null, mCurrentTime,
448+
!mService.okToDisplay());
446449
}
447450

448451
if (mService.mBlackFrame != null) {
@@ -453,10 +456,6 @@ void animate() {
453456
mService.mBlackFrame.clearMatrix();
454457
}
455458
}
456-
457-
if (mDimParams != null) {
458-
mDimAnimator.updateParameters(mContext.getResources(), mDimParams, mCurrentTime);
459-
}
460459
} catch (RuntimeException e) {
461460
Log.wtf(TAG, "Unhandled exception in Window Manager", e);
462461
} finally {

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8428,7 +8428,7 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
84288428
updateWallpaperVisibilityLocked();
84298429
}
84308430
}
8431-
if (!mInnerFields.mDimming) {
8431+
if (!mInnerFields.mDimming && mAnimator.mDimParams != null) {
84328432
mAnimator.stopDimming();
84338433
}
84348434
} catch (RuntimeException e) {

0 commit comments

Comments
 (0)