Fix crash during SysUI dumpsys

Sneaky-sneaky operator precedence. Null check was not actually
preventing us from executing the right side of the &&.

Test: manual
Change-Id: I86686c5b06ef9fd5441255792a1574d9ecd94166
This commit is contained in:
Ned Burns
2020-02-20 20:16:29 -05:00
parent 0c963a3af9
commit 017b1bba89

View File

@@ -2734,9 +2734,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
final int strongAuthFlags = mStrongAuthTracker.getStrongAuthForUser(userId);
BiometricAuthenticated fingerprint = mUserFingerprintAuthenticated.get(userId);
pw.println(" Fingerprint state (user=" + userId + ")");
pw.println(" allowed=" + fingerprint != null
&& isUnlockingWithBiometricAllowed(fingerprint.mIsStrongBiometric));
pw.println(" auth'd=" + fingerprint != null && fingerprint.mAuthenticated);
pw.println(" allowed="
+ (fingerprint != null
&& isUnlockingWithBiometricAllowed(fingerprint.mIsStrongBiometric)));
pw.println(" auth'd=" + (fingerprint != null && fingerprint.mAuthenticated));
pw.println(" authSinceBoot="
+ getStrongAuthTracker().hasUserAuthenticatedSinceBoot());
pw.println(" disabled(DPM)=" + isFingerprintDisabled(userId));
@@ -2751,9 +2752,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
final int strongAuthFlags = mStrongAuthTracker.getStrongAuthForUser(userId);
BiometricAuthenticated face = mUserFaceAuthenticated.get(userId);
pw.println(" Face authentication state (user=" + userId + ")");
pw.println(" allowed=" + face != null
&& isUnlockingWithBiometricAllowed(face.mIsStrongBiometric));
pw.println(" auth'd=" + face != null && face.mAuthenticated);
pw.println(" allowed="
+ (face != null && isUnlockingWithBiometricAllowed(face.mIsStrongBiometric)));
pw.println(" auth'd="
+ (face != null && face.mAuthenticated));
pw.println(" authSinceBoot="
+ getStrongAuthTracker().hasUserAuthenticatedSinceBoot());
pw.println(" disabled(DPM)=" + isFaceDisabled(userId));