Ensure setActiveGroup() does the right thing after a HAL crash.
Before this change, it wasn't deterministic to reset the HIDL layer
after a simulated HAL crash. It looks like it required a second client
to connect before onError() ultimately corrects mCurrentUserId.
This code forces mCurrentUserId to an unknown state, which ensures it gets
reset when we re-connect to the HAL.
Fixes b/124075073
Test: HAL crash resets mCurrentUserId.
Change-Id: Icca2ad2463dedaf0834e61c744a2ddcac15f6356
diff --git a/services/core/java/com/android/server/biometrics/face/FaceService.java b/services/core/java/com/android/server/biometrics/face/FaceService.java
index 017503a..8995068 100644
--- a/services/core/java/com/android/server/biometrics/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/face/FaceService.java
@@ -705,6 +705,8 @@
public void serviceDied(long cookie) {
super.serviceDied(cookie);
mDaemon = null;
+
+ mCurrentUserId = UserHandle.USER_NULL; // Force updateActiveGroup() to re-evaluate
}
@Override