Skip to content

Commit

Permalink
FOD: dont show FP icons if FOD is in use
Browse files Browse the repository at this point in the history
Change-Id: I9cc5abc5ac2a2591e72aad8267f34e65ef417783
  • Loading branch information
darkobas authored and liquid0624 committed May 4, 2019
1 parent d7687ca commit 6aa6203
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,18 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
private boolean mHasFaceUnlockIcon;
private int mDensity;

private boolean mDisplayFODView;

private final Runnable mDrawOffTimeout = () -> update(true /* forceUpdate */);

public LockIcon(Context context, AttributeSet attrs) {
super(context, attrs);
mTrustDrawable = new TrustDrawable(context);
setBackground(mTrustDrawable);
mUnlockMethodCache = UnlockMethodCache.getInstance(context);
mDisplayFODView = context.getResources()
.getBoolean(com.android.internal.R.bool.config_needCustomFODView);

}

@Override
Expand Down Expand Up @@ -302,13 +307,13 @@ private int getState() {
KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
boolean fingerprintRunning = updateMonitor.isFingerprintDetectionRunning();
boolean unlockingAllowed = updateMonitor.isUnlockingWithFingerprintAllowed();
if (mTransientFpError) {
if (mTransientFpError && !mDisplayFODView) {
return STATE_FINGERPRINT_ERROR;
} else if (mUnlockMethodCache.canSkipBouncer()) {
return STATE_LOCK_OPEN;
} else if (mUnlockMethodCache.isFaceUnlockRunning()) {
return STATE_FACE_UNLOCK;
} else if (fingerprintRunning && unlockingAllowed) {
} else if (fingerprintRunning && unlockingAllowed && !mDisplayFODView) {
return STATE_FINGERPRINT;
} else {
return STATE_LOCKED;
Expand Down

0 comments on commit 6aa6203

Please sign in to comment.