Loading packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +1 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class DozeMachine { case UNINITIALIZED: case INITIALIZED: case DOZE: case DOZE_REQUEST_PULSE: case DOZE_AOD_PAUSED: return Display.STATE_OFF; case DOZE_PULSING: Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +1 −1 Original line number Diff line number Diff line Loading @@ -811,6 +811,7 @@ public class KeyguardViewMediator extends SystemUI { synchronized (this) { mDeviceInteractive = false; mGoingToSleep = false; mWakeAndUnlocking = false; resetKeyguardDonePendingLocked(); mHideAnimationRun = false; Loading Loading @@ -1957,7 +1958,6 @@ public class KeyguardViewMediator extends SystemUI { if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOff"); mStatusBarKeyguardViewManager.onScreenTurnedOff(); mDrawnCallback = null; mWakeAndUnlocking = false; } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +1 −4 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ public class DozeScrimController { // be invoked when we're done so that the caller can drop the pulse wakelock. mPulseCallback = callback; mPulseReason = reason; mScrimController.setDozeInFrontAlpha(1f); mHandler.post(mPulseIn); } Loading Loading @@ -290,10 +291,6 @@ public class DozeScrimController { // Signal that the pulse is ready to turn the screen on and draw. pulseStarted(); if (mDozeParameters.getAlwaysOn()) { mHandler.post(DozeScrimController.this::onScreenTurnedOn); } } }; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { if (!mUpdateMonitor.isDeviceInteractive()) { if (!mStatusBarKeyguardViewManager.isShowing()) { return MODE_ONLY_WAKE; } else if (pulsingOrAod() && unlockingAllowed) { } else if (mDozeScrimController.isPulsing() && unlockingAllowed) { return MODE_WAKE_AND_UNLOCK_PULSING; } else if (unlockingAllowed || !mUnlockMethodCache.isMethodSecure()) { return MODE_WAKE_AND_UNLOCK; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +45 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.Context; import android.graphics.Color; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.util.Log; import android.util.MathUtils; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -120,6 +119,12 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private boolean mKeyguardFadingOutInProgress; private boolean mAnimatingDozeUnlock; private ValueAnimator mKeyguardFadeoutAnimation; /** Wake up from AOD transition is starting; need fully opaque front scrim */ private boolean mWakingUpFromAodStarting; /** Wake up from AOD transition is in progress; need black tint */ private boolean mWakingUpFromAodInProgress; /** Wake up from AOD transition is animating; need to reset when animation finishes */ private boolean mWakingUpFromAodAnimationRunning; public ScrimController(LightBarController lightBarController, ScrimView scrimBehind, ScrimView scrimInFront, View headsUpScrim) { Loading Loading @@ -187,9 +192,32 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, scheduleUpdate(); } public void prepareWakeUpFromAod() { mWakingUpFromAodInProgress = true; mWakingUpFromAodStarting = true; mAnimateChange = false; scheduleUpdate(); onPreDraw(); } public void wakeUpFromAod() { if (mWakeAndUnlocking || mAnimateKeyguardFadingOut) { // Wake and unlocking has a separate transition that must not be interfered with. mWakingUpFromAodStarting = false; return; } if (mWakingUpFromAodStarting) { mWakingUpFromAodInProgress = true; mWakingUpFromAodStarting = false; mAnimateChange = true; scheduleUpdate(); } } public void setWakeAndUnlocking() { mWakeAndUnlocking = true; mAnimatingDozeUnlock = true; mWakingUpFromAodStarting = false; scheduleUpdate(); } Loading Loading @@ -356,7 +384,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, setScrimBehindAlpha(mScrimBehindAlpha); } else { float fraction = Math.max(0, Math.min(mFraction, 1)); if (mWakingUpFromAodStarting) { setScrimInFrontAlpha(1f); } else { setScrimInFrontAlpha(0f); } setScrimBehindAlpha(fraction * (mScrimBehindAlphaKeyguard - mScrimBehindAlphaUnlocking) + mScrimBehindAlphaUnlocking); Loading Loading @@ -426,7 +458,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, scrimView.setViewAlpha(alpha); int dozeTint = Color.TRANSPARENT; if (mAnimatingDozeUnlock || mDozing) { boolean dozing = mAnimatingDozeUnlock || mDozing; boolean frontScrimDozing = mWakingUpFromAodInProgress; if (dozing || frontScrimDozing && scrim == mScrimInFront) { dozeTint = Color.BLACK; } scrimView.setTint(dozeTint); Loading Loading @@ -458,6 +493,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mKeyguardFadingOutInProgress = false; mAnimatingDozeUnlock = false; } if (mWakingUpFromAodAnimationRunning) { mWakingUpFromAodAnimationRunning = false; mWakingUpFromAodInProgress = false; } scrim.setTag(TAG_KEY_ANIM, null); scrim.setTag(TAG_KEY_ANIM_TARGET, null); } Loading @@ -467,6 +506,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mKeyguardFadingOutInProgress = true; mKeyguardFadeoutAnimation = anim; } if (mWakingUpFromAodInProgress) { mWakingUpFromAodAnimationRunning = true; } if (mSkipFirstFrame) { anim.setCurrentPlayTime(16); } Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +1 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class DozeMachine { case UNINITIALIZED: case INITIALIZED: case DOZE: case DOZE_REQUEST_PULSE: case DOZE_AOD_PAUSED: return Display.STATE_OFF; case DOZE_PULSING: Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +1 −1 Original line number Diff line number Diff line Loading @@ -811,6 +811,7 @@ public class KeyguardViewMediator extends SystemUI { synchronized (this) { mDeviceInteractive = false; mGoingToSleep = false; mWakeAndUnlocking = false; resetKeyguardDonePendingLocked(); mHideAnimationRun = false; Loading Loading @@ -1957,7 +1958,6 @@ public class KeyguardViewMediator extends SystemUI { if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOff"); mStatusBarKeyguardViewManager.onScreenTurnedOff(); mDrawnCallback = null; mWakeAndUnlocking = false; } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +1 −4 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ public class DozeScrimController { // be invoked when we're done so that the caller can drop the pulse wakelock. mPulseCallback = callback; mPulseReason = reason; mScrimController.setDozeInFrontAlpha(1f); mHandler.post(mPulseIn); } Loading Loading @@ -290,10 +291,6 @@ public class DozeScrimController { // Signal that the pulse is ready to turn the screen on and draw. pulseStarted(); if (mDozeParameters.getAlwaysOn()) { mHandler.post(DozeScrimController.this::onScreenTurnedOn); } } }; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java +1 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { if (!mUpdateMonitor.isDeviceInteractive()) { if (!mStatusBarKeyguardViewManager.isShowing()) { return MODE_ONLY_WAKE; } else if (pulsingOrAod() && unlockingAllowed) { } else if (mDozeScrimController.isPulsing() && unlockingAllowed) { return MODE_WAKE_AND_UNLOCK_PULSING; } else if (unlockingAllowed || !mUnlockMethodCache.isMethodSecure()) { return MODE_WAKE_AND_UNLOCK; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +45 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.Context; import android.graphics.Color; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.util.Log; import android.util.MathUtils; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -120,6 +119,12 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private boolean mKeyguardFadingOutInProgress; private boolean mAnimatingDozeUnlock; private ValueAnimator mKeyguardFadeoutAnimation; /** Wake up from AOD transition is starting; need fully opaque front scrim */ private boolean mWakingUpFromAodStarting; /** Wake up from AOD transition is in progress; need black tint */ private boolean mWakingUpFromAodInProgress; /** Wake up from AOD transition is animating; need to reset when animation finishes */ private boolean mWakingUpFromAodAnimationRunning; public ScrimController(LightBarController lightBarController, ScrimView scrimBehind, ScrimView scrimInFront, View headsUpScrim) { Loading Loading @@ -187,9 +192,32 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, scheduleUpdate(); } public void prepareWakeUpFromAod() { mWakingUpFromAodInProgress = true; mWakingUpFromAodStarting = true; mAnimateChange = false; scheduleUpdate(); onPreDraw(); } public void wakeUpFromAod() { if (mWakeAndUnlocking || mAnimateKeyguardFadingOut) { // Wake and unlocking has a separate transition that must not be interfered with. mWakingUpFromAodStarting = false; return; } if (mWakingUpFromAodStarting) { mWakingUpFromAodInProgress = true; mWakingUpFromAodStarting = false; mAnimateChange = true; scheduleUpdate(); } } public void setWakeAndUnlocking() { mWakeAndUnlocking = true; mAnimatingDozeUnlock = true; mWakingUpFromAodStarting = false; scheduleUpdate(); } Loading Loading @@ -356,7 +384,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, setScrimBehindAlpha(mScrimBehindAlpha); } else { float fraction = Math.max(0, Math.min(mFraction, 1)); if (mWakingUpFromAodStarting) { setScrimInFrontAlpha(1f); } else { setScrimInFrontAlpha(0f); } setScrimBehindAlpha(fraction * (mScrimBehindAlphaKeyguard - mScrimBehindAlphaUnlocking) + mScrimBehindAlphaUnlocking); Loading Loading @@ -426,7 +458,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, scrimView.setViewAlpha(alpha); int dozeTint = Color.TRANSPARENT; if (mAnimatingDozeUnlock || mDozing) { boolean dozing = mAnimatingDozeUnlock || mDozing; boolean frontScrimDozing = mWakingUpFromAodInProgress; if (dozing || frontScrimDozing && scrim == mScrimInFront) { dozeTint = Color.BLACK; } scrimView.setTint(dozeTint); Loading Loading @@ -458,6 +493,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mKeyguardFadingOutInProgress = false; mAnimatingDozeUnlock = false; } if (mWakingUpFromAodAnimationRunning) { mWakingUpFromAodAnimationRunning = false; mWakingUpFromAodInProgress = false; } scrim.setTag(TAG_KEY_ANIM, null); scrim.setTag(TAG_KEY_ANIM_TARGET, null); } Loading @@ -467,6 +506,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mKeyguardFadingOutInProgress = true; mKeyguardFadeoutAnimation = anim; } if (mWakingUpFromAodInProgress) { mWakingUpFromAodAnimationRunning = true; } if (mSkipFirstFrame) { anim.setCurrentPlayTime(16); } Loading