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

Commit 2b32c6d3 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "AOD: Only force doze brightness when actually unlocking" into oc-dr1-dev am: afda883f

am: 2168aff8

Change-Id: Ie3d6006ad5f9f63793b1bf7a73abc401d333e0ed
parents 3dd03867 2168aff8
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -166,14 +166,6 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
            }
            mHandler.postDelayed(mReleaseFingerprintWakeLockRunnable,
                    FINGERPRINT_WAKELOCK_TIMEOUT_MS);

            if (pulsingOrAod()) {
                // If we are waking the device up while we are pulsing the clock and the
                // notifications would light up first, creating an unpleasant animation.
                // Defer changing the screen brightness by forcing doze brightness on our window
                // until the clock and the notifications are faded out.
                mStatusBarWindowManager.setForceDozeBrightness(true);
            }
        }
        Trace.endSection();
    }
@@ -194,6 +186,13 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
        }
        boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive();
        mMode = calculateMode();
        if (mMode == MODE_WAKE_AND_UNLOCK_PULSING && pulsingOrAod()) {
            // If we are waking the device up while we are pulsing the clock and the
            // notifications would light up first, creating an unpleasant animation.
            // Defer changing the screen brightness by forcing doze brightness on our window
            // until the clock and the notifications are faded out.
            mStatusBarWindowManager.setForceDozeBrightness(true);
        }
        if (!wasDeviceInteractive) {
            if (DEBUG_FP_WAKELOCK) {
                Log.i(TAG, "fp wakelock: Authenticated, waking up...");
@@ -244,9 +243,6 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
            case MODE_NONE:
                break;
        }
        if (mMode != MODE_WAKE_AND_UNLOCK_PULSING) {
            mStatusBarWindowManager.setForceDozeBrightness(false);
        }
        mStatusBar.notifyFpAuthModeChanged();
        Trace.endSection();
    }