OSDN Git Service

Do not remove enumerate client immediately when user switches
authorKevin Chyn <kchyn@google.com>
Fri, 22 Mar 2019 22:52:08 +0000 (15:52 -0700)
committerKevin Chyn <kchyn@google.com>
Sat, 23 Mar 2019 00:14:03 +0000 (17:14 -0700)
The client should not be removed until ERROR_CANCEL is removed in the
system service, since that's the HIDL contract. Pending clients will start
after, automatically with the current logic.

Test: With fingerprint enrolled on multiple users, switch rapidly
      system service does not crash

Fixes: 128346522
Change-Id: I6907d8f76373c012ddffd2b98a81d70e79ac72ab

services/core/java/com/android/server/biometrics/BiometricServiceBase.java

index 3e48445..c60dd6c 100644 (file)
@@ -1251,8 +1251,6 @@ public abstract class BiometricServiceBase extends SystemService
         if (getCurrentClient() instanceof InternalRemovalClient
                 || getCurrentClient() instanceof InternalEnumerateClient) {
             Slog.w(getTag(), "User switched while performing cleanup");
-            removeClient(getCurrentClient());
-            clearEnumerateState();
         }
         updateActiveGroup(userId, null);
         doTemplateCleanupForUser(userId);