Merge "Replace 'use fingerprint to open'" into sc-dev
This commit is contained in:
@@ -821,6 +821,16 @@ public class KeyguardIndicationController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showTryFingerprintMsg() {
|
||||||
|
if (mKeyguardUpdateMonitor.isUdfpsAvailable()) {
|
||||||
|
// if udfps available, there will always be a tappable affordance to unlock
|
||||||
|
// For example, the lock icon
|
||||||
|
showTransientIndication(R.string.keyguard_unlock_press);
|
||||||
|
} else {
|
||||||
|
showTransientIndication(R.string.keyguard_try_fingerprint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||||
pw.println("KeyguardIndicationController:");
|
pw.println("KeyguardIndicationController:");
|
||||||
pw.println(" mInitialTextColorState: " + mInitialTextColorState);
|
pw.println(" mInitialTextColorState: " + mInitialTextColorState);
|
||||||
@@ -891,7 +901,7 @@ public class KeyguardIndicationController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean showSwipeToUnlock =
|
boolean showActionToUnlock =
|
||||||
msgId == KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT_RECOGNIZED;
|
msgId == KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT_RECOGNIZED;
|
||||||
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
|
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
|
||||||
mStatusBarKeyguardViewManager.showBouncerMessage(helpString,
|
mStatusBarKeyguardViewManager.showBouncerMessage(helpString,
|
||||||
@@ -899,13 +909,11 @@ public class KeyguardIndicationController {
|
|||||||
} else if (mKeyguardUpdateMonitor.isScreenOn()) {
|
} else if (mKeyguardUpdateMonitor.isScreenOn()) {
|
||||||
if (biometricSourceType == BiometricSourceType.FACE
|
if (biometricSourceType == BiometricSourceType.FACE
|
||||||
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
|
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
|
||||||
// suggest trying fingerprint
|
showTryFingerprintMsg();
|
||||||
showTransientIndication(R.string.keyguard_try_fingerprint);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showTransientIndication(helpString, false /* isError */, showSwipeToUnlock);
|
showTransientIndication(helpString, false /* isError */, showActionToUnlock);
|
||||||
}
|
} else if (showActionToUnlock) {
|
||||||
if (showSwipeToUnlock) {
|
|
||||||
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_SHOW_ACTION_TO_UNLOCK),
|
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_SHOW_ACTION_TO_UNLOCK),
|
||||||
TRANSIENT_BIOMETRIC_ERROR_TIMEOUT);
|
TRANSIENT_BIOMETRIC_ERROR_TIMEOUT);
|
||||||
}
|
}
|
||||||
@@ -921,8 +929,7 @@ public class KeyguardIndicationController {
|
|||||||
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()
|
&& shouldSuppressFaceMsgAndShowTryFingerprintMsg()
|
||||||
&& !mStatusBarKeyguardViewManager.isBouncerShowing()
|
&& !mStatusBarKeyguardViewManager.isBouncerShowing()
|
||||||
&& mKeyguardUpdateMonitor.isScreenOn()) {
|
&& mKeyguardUpdateMonitor.isScreenOn()) {
|
||||||
// suggest trying fingerprint
|
showTryFingerprintMsg();
|
||||||
showTransientIndication(R.string.keyguard_try_fingerprint);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (msgId == FaceManager.FACE_ERROR_TIMEOUT) {
|
if (msgId == FaceManager.FACE_ERROR_TIMEOUT) {
|
||||||
@@ -931,11 +938,10 @@ public class KeyguardIndicationController {
|
|||||||
if (!mStatusBarKeyguardViewManager.isBouncerShowing()
|
if (!mStatusBarKeyguardViewManager.isBouncerShowing()
|
||||||
&& mKeyguardUpdateMonitor.isUdfpsEnrolled()
|
&& mKeyguardUpdateMonitor.isUdfpsEnrolled()
|
||||||
&& mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
|
&& mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
|
||||||
// suggest trying fingerprint
|
showTryFingerprintMsg();
|
||||||
showTransientIndication(R.string.keyguard_try_fingerprint);
|
|
||||||
} else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
|
} else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
|
||||||
mStatusBarKeyguardViewManager.showBouncerMessage(
|
mStatusBarKeyguardViewManager.showBouncerMessage(
|
||||||
mContext.getResources().getString(R.string.keyguard_try_fingerprint),
|
mContext.getResources().getString(R.string.keyguard_unlock_press),
|
||||||
mInitialTextColorState
|
mInitialTextColorState
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user