Loading services/core/java/com/android/server/biometrics/face/FaceService.java +26 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ import com.android.server.SystemServerInitThreadPool; import com.android.server.biometrics.AuthenticationClient; import com.android.server.biometrics.BiometricServiceBase; import com.android.server.biometrics.BiometricUtils; import com.android.server.biometrics.ClientMonitor; import com.android.server.biometrics.Constants; import com.android.server.biometrics.EnumerateClient; import com.android.server.biometrics.RemovalClient; Loading Loading @@ -342,7 +343,16 @@ public class FaceService extends BiometricServiceBase { @Override // Binder call public int revokeChallenge(IBinder token) { checkPermission(MANAGE_BIOMETRIC); // TODO(b/137106905): Schedule binder calls in FaceService to avoid deadlocks. if (getCurrentClient() == null) { // if we aren't handling any other HIDL calls (mCurrentClient == null), revoke the // challenge right away. return startRevokeChallenge(token); } else { // postpone revoking the challenge until we finish processing the current HIDL call. mRevokeChallengePending = true; return Status.OK; } } @Override // Binder call Loading Loading @@ -812,6 +822,7 @@ public class FaceService extends BiometricServiceBase { @GuardedBy("this") private IBiometricsFace mDaemon; private UsageStats mUsageStats; private boolean mRevokeChallengePending = false; // One of the AuthenticationClient constants private int mCurrentUserLockoutMode; Loading Loading @@ -1040,6 +1051,15 @@ public class FaceService extends BiometricServiceBase { .getIntArray(R.array.config_face_acquire_vendor_enroll_ignorelist); } @Override protected void removeClient(ClientMonitor client) { super.removeClient(client); if (mRevokeChallengePending) { startRevokeChallenge(null); mRevokeChallengePending = false; } } @Override public void onStart() { super.onStart(); Loading Loading @@ -1251,7 +1271,11 @@ public class FaceService extends BiometricServiceBase { return 0; } try { return daemon.revokeChallenge(); final int res = daemon.revokeChallenge(); if (res != Status.OK) { Slog.e(TAG, "revokeChallenge returned " + res); } return res; } catch (RemoteException e) { Slog.e(TAG, "startRevokeChallenge failed", e); } Loading Loading
services/core/java/com/android/server/biometrics/face/FaceService.java +26 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ import com.android.server.SystemServerInitThreadPool; import com.android.server.biometrics.AuthenticationClient; import com.android.server.biometrics.BiometricServiceBase; import com.android.server.biometrics.BiometricUtils; import com.android.server.biometrics.ClientMonitor; import com.android.server.biometrics.Constants; import com.android.server.biometrics.EnumerateClient; import com.android.server.biometrics.RemovalClient; Loading Loading @@ -342,7 +343,16 @@ public class FaceService extends BiometricServiceBase { @Override // Binder call public int revokeChallenge(IBinder token) { checkPermission(MANAGE_BIOMETRIC); // TODO(b/137106905): Schedule binder calls in FaceService to avoid deadlocks. if (getCurrentClient() == null) { // if we aren't handling any other HIDL calls (mCurrentClient == null), revoke the // challenge right away. return startRevokeChallenge(token); } else { // postpone revoking the challenge until we finish processing the current HIDL call. mRevokeChallengePending = true; return Status.OK; } } @Override // Binder call Loading Loading @@ -812,6 +822,7 @@ public class FaceService extends BiometricServiceBase { @GuardedBy("this") private IBiometricsFace mDaemon; private UsageStats mUsageStats; private boolean mRevokeChallengePending = false; // One of the AuthenticationClient constants private int mCurrentUserLockoutMode; Loading Loading @@ -1040,6 +1051,15 @@ public class FaceService extends BiometricServiceBase { .getIntArray(R.array.config_face_acquire_vendor_enroll_ignorelist); } @Override protected void removeClient(ClientMonitor client) { super.removeClient(client); if (mRevokeChallengePending) { startRevokeChallenge(null); mRevokeChallengePending = false; } } @Override public void onStart() { super.onStart(); Loading Loading @@ -1251,7 +1271,11 @@ public class FaceService extends BiometricServiceBase { return 0; } try { return daemon.revokeChallenge(); final int res = daemon.revokeChallenge(); if (res != Status.OK) { Slog.e(TAG, "revokeChallenge returned " + res); } return res; } catch (RemoteException e) { Slog.e(TAG, "startRevokeChallenge failed", e); } Loading