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

Commit 11d70db8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update Active Group before creating AuthClient"

parents a46c0d2b 747e29ba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -163,8 +163,8 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
                mAuthenticationCallback = callback;
                mCryptoObject = crypto;
                long sessionId = crypto != null ? crypto.getOpId() : 0;
                mService.authenticate(mToken, sessionId, mServiceReceiver, flags,
                        mContext.getOpPackageName());
                mService.authenticate(mToken, sessionId, mContext.getUserId(), mServiceReceiver,
                        flags, mContext.getOpPackageName());
            } catch (RemoteException e) {
                Log.w(TAG, "Remote exception while authenticating: ", e);
                if (callback != null) {
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import android.hardware.face.Face;
 */
interface IFaceService {
    // Authenticate the given sessionId with a face
    void authenticate(IBinder token, long sessionId,
    void authenticate(IBinder token, long sessionId, int userid,
            IFaceServiceReceiver receiver, int flags, String opPackageName);

    // This method prepares the service to start authenticating, but doesn't start authentication.
+0 −2
Original line number Diff line number Diff line
@@ -819,8 +819,6 @@ public abstract class BiometricServiceBase extends SystemService

    // Should be done on a handler thread - not on the Binder's thread.
    private void startAuthentication(AuthenticationClientImpl client, String opPackageName) {
        updateActiveGroup(client.getGroupId(), opPackageName);

        if (DEBUG) Slog.v(getTag(), "startAuthentication(" + opPackageName + ")");

        int lockoutMode = getLockoutMode();
+2 −1
Original line number Diff line number Diff line
@@ -133,10 +133,11 @@ public class FaceService extends BiometricServiceBase {
        }

        @Override // Binder call
        public void authenticate(final IBinder token, final long opId,
        public void authenticate(final IBinder token, final long opId, int userId,
                final IFaceServiceReceiver receiver, final int flags,
                final String opPackageName) {
            checkPermission(USE_BIOMETRIC_INTERNAL);
            updateActiveGroup(userId, opPackageName);
            final boolean restricted = isRestricted();
            final AuthenticationClientImpl client = new FaceAuthClient(getContext(),
                    mDaemonWrapper, mHalDeviceId, token, new ServiceListenerImpl(receiver),
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@ public class FingerprintService extends BiometricServiceBase {
        public void authenticate(final IBinder token, final long opId, final int groupId,
                final IFingerprintServiceReceiver receiver, final int flags,
                final String opPackageName) {
            updateActiveGroup(groupId, opPackageName);
            final boolean restricted = isRestricted();
            final AuthenticationClientImpl client = new FingerprintAuthClient(getContext(),
                    mDaemonWrapper, mHalDeviceId, token, new ServiceListenerImpl(receiver),