OSDN Git Service

Revert fix for FingerprintManager leak
authorKevin Chyn <kchyn@google.com>
Wed, 24 May 2017 23:56:56 +0000 (16:56 -0700)
committerKevin Chyn <kchyn@google.com>
Wed, 24 May 2017 23:58:18 +0000 (16:58 -0700)
Bug: 38509779
Bug: 32295793

Setting to null causes problem seen in b/38509779
Using weakreference will cause problems if the application
declares AuthenticationClient as a weak reference as well and would
very likely break a lot of existing apps.

Test: manual
Change-Id: Iedbdd76f3a402b766ce8a799bf76324d1164a0ec

core/java/android/hardware/fingerprint/FingerprintManager.java

index b00e65a..324a08c 100644 (file)
@@ -932,7 +932,6 @@ public class FingerprintManager {
             } else if (mAuthenticationCallback != null) {
                 mAuthenticationCallback.onAuthenticationError(clientErrMsgId,
                         getErrorString(errMsgId, vendorCode));
-                mAuthenticationCallback = null;
             } else if (mRemovalCallback != null) {
                 mRemovalCallback.onRemovalError(mRemovalFingerprint, clientErrMsgId,
                         getErrorString(errMsgId, vendorCode));
@@ -953,7 +952,6 @@ public class FingerprintManager {
                 final AuthenticationResult result =
                         new AuthenticationResult(mCryptoObject, fp, userId);
                 mAuthenticationCallback.onAuthenticationSucceeded(result);
-                mAuthenticationCallback = null;
             }
         }