Merge "Prevent double animation of lockicon when waking." into rvc-dev am: bea0158545 am: 687acec369
Change-Id: Ia8c9504529e3aa1df1b9c33e5c4f5a73c1f1fbcd
This commit is contained in:
@@ -39,6 +39,11 @@ public interface StatusBarStateController {
|
||||
*/
|
||||
boolean isDozing();
|
||||
|
||||
/**
|
||||
* Is device pulsing.
|
||||
*/
|
||||
boolean isPulsing();
|
||||
|
||||
/**
|
||||
* Adds a state listener
|
||||
*/
|
||||
|
||||
@@ -177,6 +177,11 @@ public class StatusBarStateControllerImpl implements SysuiStatusBarStateControll
|
||||
return mIsDozing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPulsing() {
|
||||
return mPulsing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDozeAmount() {
|
||||
return mDozeAmount;
|
||||
|
||||
@@ -214,7 +214,6 @@ public final class DozeServiceHost implements DozeHost {
|
||||
dozing = false;
|
||||
}
|
||||
|
||||
|
||||
mStatusBarStateController.setIsDozing(dozing);
|
||||
}
|
||||
|
||||
@@ -260,7 +259,6 @@ public final class DozeServiceHost implements DozeHost {
|
||||
mKeyguardViewMediator.setPulsing(pulsing);
|
||||
mNotificationPanel.setPulsing(pulsing);
|
||||
mVisualStabilityManager.setPulsing(pulsing);
|
||||
mLockscreenLockIconController.setPulsing(pulsing);
|
||||
mIgnoreTouchWhilePulsing = false;
|
||||
if (mKeyguardUpdateMonitor != null && passiveAuthInterrupt) {
|
||||
mKeyguardUpdateMonitor.onAuthInterruptDetected(pulsing /* active */);
|
||||
|
||||
@@ -76,8 +76,6 @@ public class LockscreenLockIconController {
|
||||
private boolean mKeyguardShowing;
|
||||
private boolean mKeyguardJustShown;
|
||||
private boolean mBlockUpdates;
|
||||
private boolean mPulsing;
|
||||
private boolean mDozing;
|
||||
private boolean mSimLocked;
|
||||
private boolean mTransientBiometricsError;
|
||||
private boolean mDocked;
|
||||
@@ -123,6 +121,11 @@ public class LockscreenLockIconController {
|
||||
setDozing(isDozing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPulsingChanged(boolean pulsing) {
|
||||
setPulsing(pulsing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDozeAmountChanged(float linear, float eased) {
|
||||
if (mLockIcon != null) {
|
||||
@@ -378,8 +381,7 @@ public class LockscreenLockIconController {
|
||||
/**
|
||||
* Propagate {@link StatusBar} pulsing state.
|
||||
*/
|
||||
public void setPulsing(boolean pulsing) {
|
||||
mPulsing = pulsing;
|
||||
private void setPulsing(boolean pulsing) {
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -461,7 +463,8 @@ public class LockscreenLockIconController {
|
||||
shouldUpdate = false;
|
||||
}
|
||||
if (shouldUpdate && mLockIcon != null) {
|
||||
mLockIcon.update(state, mPulsing, mDozing, mKeyguardJustShown);
|
||||
mLockIcon.update(state, mStatusBarStateController.isPulsing(),
|
||||
mStatusBarStateController.isDozing(), mKeyguardJustShown);
|
||||
}
|
||||
mLastState = state;
|
||||
mKeyguardJustShown = false;
|
||||
@@ -477,7 +480,8 @@ public class LockscreenLockIconController {
|
||||
return STATE_LOCK_OPEN;
|
||||
} else if (mTransientBiometricsError) {
|
||||
return STATE_BIOMETRICS_ERROR;
|
||||
} else if (mKeyguardUpdateMonitor.isFaceDetectionRunning() && !mPulsing) {
|
||||
} else if (mKeyguardUpdateMonitor.isFaceDetectionRunning()
|
||||
&& !mStatusBarStateController.isPulsing()) {
|
||||
return STATE_SCANNING_FACE;
|
||||
} else {
|
||||
return STATE_LOCKED;
|
||||
@@ -489,7 +493,6 @@ public class LockscreenLockIconController {
|
||||
}
|
||||
|
||||
private void setDozing(boolean isDozing) {
|
||||
mDozing = isDozing;
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -504,7 +507,8 @@ public class LockscreenLockIconController {
|
||||
* @return true if the visibility changed
|
||||
*/
|
||||
private boolean updateIconVisibility() {
|
||||
boolean onAodNotPulsingOrDocked = mDozing && (!mPulsing || mDocked);
|
||||
boolean onAodNotPulsingOrDocked = mStatusBarStateController.isDozing()
|
||||
&& (!mStatusBarStateController.isPulsing() || mDocked);
|
||||
boolean invisible = onAodNotPulsingOrDocked || mWakeAndUnlockRunning
|
||||
|| mShowingLaunchAffordance;
|
||||
if (mKeyguardBypassController.getBypassEnabled() && !mBouncerShowingScrimmed) {
|
||||
|
||||
Reference in New Issue
Block a user