Remove obsolete state

There isn't a fingerprint animation, we don't need the timeout anymore.
This event was triggering unwanted updates, cancelling animations
during wake-up.

Fixes: 134448130
Test: power to wake-up: observe animation
Test: fingerprint from bouncer: observe animation
Test: fingerprint to wake-up: no animation
Change-Id: I17fcd9eb5eba7e7bc88de09309f5c310fe13433f
This commit is contained in:
Lucas Dupin
2019-06-07 11:44:28 -07:00
parent 37c7eb8baf
commit de8c25ac2d

View File

@@ -66,8 +66,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
StatusBarStateController.StateListener, ConfigurationController.ConfigurationListener,
UnlockMethodCache.OnUnlockMethodChangedListener {
private static final int FP_DRAW_OFF_TIMEOUT = 800;
private static final int STATE_LOCKED = 0;
private static final int STATE_LOCK_OPEN = 1;
private static final int STATE_SCANNING_FACE = 2;
@@ -83,8 +81,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
private int mLastState = 0;
private boolean mTransientBiometricsError;
private boolean mScreenOn;
private boolean mLastScreenOn;
private boolean mIsFaceUnlockState;
private boolean mSimLocked;
private int mDensity;
@@ -109,7 +105,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
update(false /* force */);
}
};
private final Runnable mDrawOffTimeout = () -> update(true /* forceUpdate */);
private final DockManager.DockEventListener mDockEventListener =
new DockManager.DockEventListener() {
@Override
@@ -125,18 +120,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
private final KeyguardUpdateMonitorCallback mUpdateMonitorCallback =
new KeyguardUpdateMonitorCallback() {
@Override
public void onScreenTurnedOn() {
mScreenOn = true;
update();
}
@Override
public void onScreenTurnedOff() {
mScreenOn = false;
update();
}
@Override
public void onSimStateChanged(int subId, int slotId,
IccCardConstants.State simState) {
@@ -249,8 +232,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
public void update(boolean force) {
int state = getState();
mIsFaceUnlockState = state == STATE_SCANNING_FACE;
if (state != mLastState || mLastDozing != mDozing || mLastPulsing != mPulsing
|| mLastScreenOn != mScreenOn || force) {
if (state != mLastState || mLastDozing != mDozing || mLastPulsing != mPulsing || force) {
@LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(mLastState,
state, mLastPulsing, mPulsing, mLastDozing, mDozing);
boolean isAnim = lockAnimIndex != -1;
@@ -289,15 +271,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
}
updateDarkTint();
if (isAnim && !mLastScreenOn) {
removeCallbacks(mDrawOffTimeout);
postDelayed(mDrawOffTimeout, FP_DRAW_OFF_TIMEOUT);
} else {
removeCallbacks(mDrawOffTimeout);
}
mLastState = state;
mLastScreenOn = mScreenOn;
mLastDozing = mDozing;
mLastPulsing = mPulsing;
}