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

Commit 25a5680d authored by Kevin Chyn's avatar Kevin Chyn
Browse files

5/n: Rename sessionId to operationId

sessionId was a leftover misnaming from a long time ago. This
parameter is actually the operationId for the keystore
cryptographic operation to be unlocked after authentication
succeeds.

Bug: 149067920

Test: Builds
Change-Id: Id27a9379316980fae21e0f10433cb35459891f85
parent a531a7fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -934,7 +934,7 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
            mCryptoObject = crypto;
            mExecutor = executor;
            mAuthenticationCallback = callback;
            final long sessionId = crypto != null ? crypto.getOpId() : 0;
            final long operationId = crypto != null ? crypto.getOpId() : 0;

            final Bundle bundle;
            if (crypto != null) {
@@ -950,7 +950,7 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
                bundle = mBundle;
            }

            mService.authenticate(mToken, sessionId, userId, mBiometricServiceReceiver,
            mService.authenticate(mToken, operationId, userId, mBiometricServiceReceiver,
                    mContext.getOpPackageName(), bundle);

        } catch (RemoteException e) {
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ interface IBiometricAuthenticator {
    // called from BiometricService. The additional uid, pid, userId arguments should be determined
    // by BiometricService. To start authentication after the clients are ready, use
    // startPreparedClient().
    void prepareForAuthentication(boolean requireConfirmation, IBinder token, long sessionId,
    void prepareForAuthentication(boolean requireConfirmation, IBinder token, long operationId,
            int userId, IBiometricServiceReceiverInternal wrapperReceiver, String opPackageName,
            int cookie, int callingUid, int callingPid, int callingUserId);

+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import android.hardware.biometrics.IBiometricAuthenticator;
interface IBiometricService {
    // Requests authentication. The service choose the appropriate biometric to use, and show
    // the corresponding BiometricDialog.
    void authenticate(IBinder token, long sessionId, int userId,
    void authenticate(IBinder token, long operationId, int userId,
            IBiometricServiceReceiver receiver, String opPackageName, in Bundle bundle,
            int callingUid, int callingPid, int callingUserId);

+2 −2
Original line number Diff line number Diff line
@@ -228,9 +228,9 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
                useHandler(handler);
                mAuthenticationCallback = callback;
                mCryptoObject = crypto;
                long sessionId = crypto != null ? crypto.getOpId() : 0;
                final long operationId = crypto != null ? crypto.getOpId() : 0;
                Trace.beginSection("FaceManager#authenticate");
                mService.authenticate(mToken, sessionId, userId, mServiceReceiver,
                mService.authenticate(mToken, operationId, userId, mServiceReceiver,
                        flags, mContext.getOpPackageName());
            } catch (RemoteException e) {
                Log.w(TAG, "Remote exception while authenticating: ", e);
+2 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import android.view.Surface;
 */
interface IFaceService {
    // Authenticate the given sessionId with a face
    void authenticate(IBinder token, long sessionId, int userid,
    void authenticate(IBinder token, long operationId, int userid,
            IFaceServiceReceiver receiver, int flags, String opPackageName);

    // This method prepares the service to start authenticating, but doesn't start authentication.
@@ -36,7 +36,7 @@ interface IFaceService {
    // called from BiometricService. The additional uid, pid, userId arguments should be determined
    // by BiometricService. To start authentication after the clients are ready, use
    // startPreparedClient().
    void prepareForAuthentication(boolean requireConfirmation, IBinder token, long sessionId,
    void prepareForAuthentication(boolean requireConfirmation, IBinder token, long operationId,
            int userId, IBiometricServiceReceiverInternal wrapperReceiver, String opPackageName,
            int cookie, int callingUid, int callingPid, int callingUserId);

Loading