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

Commit 4f248d0d authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am 8fcfdd39: am 255632d1: Merge "Prevent dim surface from flashing." into jb-dev

* commit '8fcfdd39':
  Prevent dim surface from flashing.
parents fc0c048e 8fcfdd39
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -538,9 +538,17 @@ public class WindowAnimator {
        if (mDimAnimator == null) {
            mDimAnimator = new DimAnimator(mService.mFxSession);
        }
        // Only set dim params on the highest dimmed layer.
        final WindowStateAnimator dimWinAnimator = mDimParams == null
                ? null : mDimParams.mDimWinAnimator;
        // Don't turn on for an unshown surface, or for any layer but the highest dimmed one.
        if (winAnimator.mSurfaceShown &&
                (dimWinAnimator == null || !dimWinAnimator.mSurfaceShown
                || dimWinAnimator.mAnimLayer < winAnimator.mAnimLayer)) {
            mService.mH.sendMessage(mService.mH.obtainMessage(SET_DIM_PARAMETERS,
                    new DimAnimator.Parameters(winAnimator, width, height, target)));
        }
    }

    // TODO(cmautner): Move into Handler
    void stopDimming() {