From 5a8e522c6c3d71164f9d84ef98461de5dff4ccef Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 20 Apr 2016 14:06:00 -0700 Subject: [PATCH] Fix bug where fingerprint for wrong userId was attempted to be removed. - cleaned up private API to ensure userId is distinct from groupId. - fixed bug where we were sending the wrong userId when attempting to - fix warning about wrong fingerId when receiving final id of 0. Fixes bug 28268635 Change-Id: Ic8abfbf6fbf173db2d57a76ac2e38b2a71ffd19e --- src/com/android/settings/ChooseLockGeneric.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java index 1182ed51682..74ec4bba1aa 100644 --- a/src/com/android/settings/ChooseLockGeneric.java +++ b/src/com/android/settings/ChooseLockGeneric.java @@ -651,8 +651,10 @@ public class ChooseLockGeneric extends SettingsActivity { if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected() && mFingerprintManager.hasEnrolledFingerprints(userId)) { mFingerprintManager.setActiveUser(userId); - mFingerprintManager.remove( - new Fingerprint(null, userId, 0, 0), userId, + // For the purposes of M and N, groupId is the same as userId. + final int groupId = userId; + Fingerprint finger = new Fingerprint(null, groupId, 0, 0); + mFingerprintManager.remove(finger, userId, new RemovalCallback() { @Override public void onRemovalError(Fingerprint fp, int errMsgId,