private void onFingerIdentify() { if (!isActiveFingerPrint()) { DebugLog.d(LOG_TAG, "onFingerIdentify isActiveFingerPrint flase"); return; } if (KeyguardViewHostManager.getInstance().isScreenOn()) { KeyguardViewHostManager.getInstance().fingerPrintSuccess(); KeyguardViewHostManager.getInstance().unlockByFingerIdentify(); } }
public boolean openFingerPrintOrNot() { KeyguardViewHostManager manager = KeyguardViewHostManager.getInstance(); if (manager == null) { return false; } DebugLog.d(LOG_TAG, "isActiveFingerPrint isSecureFrozen: " + isSecureFrozen()); if (isSecureFrozen()) { return false; } boolean isSecure = manager.isSecure(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isSecure: " + isSecure); if (!isSecure) { return false; } boolean isSkylightShown = manager.getIsSkylightShown(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isSkylightShown: " + isSkylightShown); if (isSkylightShown) { return false; } boolean isKeyguardShown = manager.isShowingAndNotOccluded(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isKeyguardShown: " + isKeyguardShown); if (!isKeyguardShown) { return false; } boolean isSimRequired = manager.needsFullscreenBouncer(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isSimRequired: " + isSimRequired); if (isSimRequired) { return false; } return true; }
private boolean isActiveFingerPrint() { KeyguardViewHostManager manager = KeyguardViewHostManager.getInstance(); if (manager == null) { return false; } DebugLog.d(LOG_TAG, "isActiveFingerPrint isSecureFrozen: " + isSecureFrozen()); if (isSecureFrozen()) { return false; } boolean isSupportFinger = KeyguardViewHostManager.isSuppotFinger(); if (!isSupportFinger) { return false; } DebugLog.d(LOG_TAG, "isActiveFingerPrint switchOpen: " + mFingerprintSwitchOpen); if (!mFingerprintSwitchOpen) { return false; } boolean isSecure = manager.isSecure(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isSecure: " + isSecure); if (!isSecure) { return false; } boolean isSkylightShown = manager.getIsSkylightShown(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isSkylightShown: " + isSkylightShown); if (isSkylightShown) { return false; } boolean isKeyguardShown = manager.isShowingAndNotOccluded(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isKeyguardShown: " + isKeyguardShown); if (!isKeyguardShown) { return false; } boolean isScreenOn = manager.isScreenOn(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isScreenOn: " + isScreenOn); if (!isScreenOn) { return false; } boolean isSimRequired = manager.needsFullscreenBouncer(); DebugLog.d(LOG_TAG, "isActiveFingerPrint isSimRequired: " + isSimRequired); if (isSimRequired) { return false; } return true; }
private boolean isAtHomePosition() { return KeyguardViewHostManager.getInstance().isAmigoHostYAtHomePostion(); }
private boolean isSecureFrozen() { return KeyguardViewHostManager.getInstance().passwordViewIsForzen(); }
private void fingerMatchFail() { DebugLog.e(LOG_TAG, "fingerMatchFail isSecureFrozen---" + isSecureFrozen()); if (isSecureFrozen()) { cancel(); return; } if (isAtHomePosition()) { DebugLog.d(LOG_TAG, "fingerMatchFail isAtHomePosition : true"); if (mIdentifyFailedTimes < 2) { mIdentifyFailedTimes++; KeyguardViewHostManager.getInstance().shakeFingerIdentifyTip(); VibatorUtil.amigoVibrate( mContext, VibatorUtil.LOCKSCREEN_UNLOCK_CODE_ERROR, VibatorUtil.UNLOCK_ERROR_VIBRATE_TIME); synchronized (this) { FingerThread.getInstance() .excuteTask( new Runnable() { @Override public void run() { startIdentifyIfNeed(); } }); } } else if (mIdentifyFailedTimes == 2) { mIdentifyFailedTimes = 0; KeyguardViewHostManager.getInstance().shakeFingerIdentifyTip(); VibatorUtil.amigoVibrate( mContext, VibatorUtil.LOCKSCREEN_UNLOCK_CODE_ERROR, VibatorUtil.UNLOCK_ERROR_VIBRATE_TIME); synchronized (this) { FingerThread.getInstance() .excuteTask( new Runnable() { @Override public void run() { startIdentifyIfNeed(); } }); } KeyguardViewHostManager.getInstance().scrollToUnlockHeightByOther(true); } } else { DebugLog.d(LOG_TAG, "fingerMatchFail isAtHomePosition : false"); mIdentifyFailedTimes = 0; KeyguardViewHostManager.getInstance().fingerPrintFailed(); synchronized (this) { FingerThread.getInstance() .excuteTask( new Runnable() { @Override public void run() { startIdentifyIfNeed(); } }); } } }