Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a8e522c authored by Jim Miller's avatar Jim Miller
Browse files

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
parent c2dae39a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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,