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

Commit 3f721e8e authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "BiometricService: put the mthod of resetLockoutFor into handler when...

Merge "BiometricService: put the mthod of resetLockoutFor into handler when binder called and keep thread-safe in RingBuffer." into main am: 1e40a6c1 am: 69a7b79f

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3040374



Change-Id: Icc856d53dc8485f4c1e34d374debd5f528e0b408
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 85cfaa2a 69a7b79f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -850,8 +850,10 @@ public class BiometricService extends SystemService {

            Slog.d(TAG, "resetLockout(userId=" + userId
                    + ", hat=" + (hardwareAuthToken == null ? "null " : "present") + ")");
            mHandler.post(() -> {
                mBiometricContext.getAuthSessionCoordinator()
                    .resetLockoutFor(userId, Authenticators.BIOMETRIC_STRONG, -1);
            });
        }

        @android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
+2 −2
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ public class AuthSessionCoordinator implements AuthSessionListener {
            mApiCallNumber = 0;
        }

        void addApiCall(String str) {
        synchronized void addApiCall(String str) {
            mApiCalls[mCurr] = str;
            mCurr++;
            mCurr %= mSize;
@@ -243,7 +243,7 @@ public class AuthSessionCoordinator implements AuthSessionListener {
        }

        @Override
        public String toString() {
        public synchronized String toString() {
            String buffer = "";
            int apiCall = mApiCallNumber > mSize ? mApiCallNumber - mSize : 0;
            for (int i = 0; i < mSize; i++) {