From 5e797faaf4854e1665f09d422b1921d89a928d97 Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Wed, 24 May 2017 16:56:56 -0700 Subject: [PATCH] Revert fix for FingerprintManager leak 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 | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java index b00e65a24fb70..324a08ca9e1bc 100644 --- a/core/java/android/hardware/fingerprint/FingerprintManager.java +++ b/core/java/android/hardware/fingerprint/FingerprintManager.java @@ -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; } }