Merge "Fix logic error / possible NPE in AuthenticationSidecar"

This commit is contained in:
Kevin Chyn
2017-10-04 00:31:28 +00:00
committed by Android (Google) Code Review

View File

@@ -117,12 +117,12 @@ public class FingerprintAuthenticateSidecar extends InstrumentedPreferenceFragme
public void setListener(Listener listener) {
if (mListener == null && listener != null) {
if (mAuthenticationResult != null) {
mListener.onAuthenticationSucceeded(mAuthenticationResult);
listener.onAuthenticationSucceeded(mAuthenticationResult);
mAuthenticationResult = null;
}
if (mAuthenticationError != null &&
mAuthenticationError.error != FingerprintManager.FINGERPRINT_ERROR_CANCELED) {
mListener.onAuthenticationError(mAuthenticationError.error,
listener.onAuthenticationError(mAuthenticationError.error,
mAuthenticationError.errorString);
mAuthenticationError = null;
}