Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +10 −2 Original line number Diff line number Diff line Loading @@ -1049,8 +1049,16 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, } private String getNotRecognizedString(@Modality int modality) { return mContext.getString(modality == TYPE_FACE ? R.string.biometric_face_not_recognized : R.string.biometric_not_recognized); final int messageRes; final int userId = mCurrentDialogArgs.argi1; if (isFaceAuthEnrolled(userId) && isFingerprintEnrolled(userId)) { messageRes = modality == TYPE_FACE ? R.string.biometric_face_not_recognized : R.string.fingerprint_error_not_match; } else { messageRes = R.string.biometric_not_recognized; } return mContext.getString(messageRes); } private String getErrorString(@Modality int modality, int error, int vendorCode) { Loading services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,10 @@ public class BiometricServiceTest { .thenReturn(ERROR_HW_UNAVAILABLE); when(mResources.getString(R.string.biometric_not_recognized)) .thenReturn(ERROR_NOT_RECOGNIZED); when(mResources.getString(R.string.biometric_face_not_recognized)) .thenReturn(ERROR_NOT_RECOGNIZED); when(mResources.getString(R.string.fingerprint_error_not_match)) .thenReturn(ERROR_NOT_RECOGNIZED); when(mResources.getString(R.string.biometric_error_user_canceled)) .thenReturn(ERROR_USER_CANCELED); Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +10 −2 Original line number Diff line number Diff line Loading @@ -1049,8 +1049,16 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, } private String getNotRecognizedString(@Modality int modality) { return mContext.getString(modality == TYPE_FACE ? R.string.biometric_face_not_recognized : R.string.biometric_not_recognized); final int messageRes; final int userId = mCurrentDialogArgs.argi1; if (isFaceAuthEnrolled(userId) && isFingerprintEnrolled(userId)) { messageRes = modality == TYPE_FACE ? R.string.biometric_face_not_recognized : R.string.fingerprint_error_not_match; } else { messageRes = R.string.biometric_not_recognized; } return mContext.getString(messageRes); } private String getErrorString(@Modality int modality, int error, int vendorCode) { Loading
services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,10 @@ public class BiometricServiceTest { .thenReturn(ERROR_HW_UNAVAILABLE); when(mResources.getString(R.string.biometric_not_recognized)) .thenReturn(ERROR_NOT_RECOGNIZED); when(mResources.getString(R.string.biometric_face_not_recognized)) .thenReturn(ERROR_NOT_RECOGNIZED); when(mResources.getString(R.string.fingerprint_error_not_match)) .thenReturn(ERROR_NOT_RECOGNIZED); when(mResources.getString(R.string.biometric_error_user_canceled)) .thenReturn(ERROR_USER_CANCELED); Loading