Let lock icon reappear after fingerprint draw off
am: f6103695f8
Change-Id: I4164417babaea46cce421d82530597b6e743e34b
This commit is contained in:
@@ -35,6 +35,8 @@ import com.android.systemui.statusbar.policy.AccessibilityController;
|
|||||||
*/
|
*/
|
||||||
public class LockIcon extends KeyguardAffordanceView {
|
public class LockIcon extends KeyguardAffordanceView {
|
||||||
|
|
||||||
|
private static final int FP_DRAW_OFF_TIMEOUT = 800;
|
||||||
|
|
||||||
private static final int STATE_LOCKED = 0;
|
private static final int STATE_LOCKED = 0;
|
||||||
private static final int STATE_LOCK_OPEN = 1;
|
private static final int STATE_LOCK_OPEN = 1;
|
||||||
private static final int STATE_FACE_UNLOCK = 2;
|
private static final int STATE_FACE_UNLOCK = 2;
|
||||||
@@ -53,6 +55,8 @@ public class LockIcon extends KeyguardAffordanceView {
|
|||||||
private boolean mHasFingerPrintIcon;
|
private boolean mHasFingerPrintIcon;
|
||||||
private int mDensity;
|
private int mDensity;
|
||||||
|
|
||||||
|
private final Runnable mDrawOffTimeout = () -> update(true /* forceUpdate */);
|
||||||
|
|
||||||
public LockIcon(Context context, AttributeSet attrs) {
|
public LockIcon(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
mTrustDrawable = new TrustDrawable(context);
|
mTrustDrawable = new TrustDrawable(context);
|
||||||
@@ -116,7 +120,6 @@ public class LockIcon extends KeyguardAffordanceView {
|
|||||||
} else {
|
} else {
|
||||||
mTrustDrawable.stop();
|
mTrustDrawable.stop();
|
||||||
}
|
}
|
||||||
// TODO: Real icon for facelock.
|
|
||||||
int state = getState();
|
int state = getState();
|
||||||
boolean anyFingerprintIcon = state == STATE_FINGERPRINT || state == STATE_FINGERPRINT_ERROR;
|
boolean anyFingerprintIcon = state == STATE_FINGERPRINT || state == STATE_FINGERPRINT_ERROR;
|
||||||
boolean useAdditionalPadding = anyFingerprintIcon;
|
boolean useAdditionalPadding = anyFingerprintIcon;
|
||||||
@@ -171,6 +174,14 @@ public class LockIcon extends KeyguardAffordanceView {
|
|||||||
animation.forceAnimationOnUI();
|
animation.forceAnimationOnUI();
|
||||||
animation.start();
|
animation.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (iconRes == R.drawable.lockscreen_fingerprint_draw_off_animation) {
|
||||||
|
removeCallbacks(mDrawOffTimeout);
|
||||||
|
postDelayed(mDrawOffTimeout, FP_DRAW_OFF_TIMEOUT);
|
||||||
|
} else {
|
||||||
|
removeCallbacks(mDrawOffTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
mLastState = state;
|
mLastState = state;
|
||||||
mLastDeviceInteractive = mDeviceInteractive;
|
mLastDeviceInteractive = mDeviceInteractive;
|
||||||
mLastScreenOn = mScreenOn;
|
mLastScreenOn = mScreenOn;
|
||||||
|
|||||||
Reference in New Issue
Block a user