Do not updateActiveGroup on a handler

This method must not return to the caller until complete, otherwise
weird race conditions may occur.

Bug: 110907543

Test: Builds
Change-Id: Ia82671b34fac3662928012d8c709143efdf92266
This commit is contained in:
Kevin Chyn
2019-04-03 18:12:48 -07:00
parent b13733024f
commit 7776536966

View File

@@ -903,9 +903,8 @@ public abstract class BiometricServiceBase extends SystemService
}
protected void setActiveUserInternal(int userId) {
mHandler.post(() -> {
updateActiveGroup(userId, null /* clientPackage */);
});
// Do not put on handler, since it should finish before returning to caller.
updateActiveGroup(userId, null /* clientPackage */);
}
protected void removeInternal(RemovalClient client) {