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

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

Merge "Add @IntDef to BiometricManager"

parents a7a1a152 b97e9c93
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.hardware.biometrics;
import static android.Manifest.permission.USE_BIOMETRIC;
import static android.Manifest.permission.USE_BIOMETRIC_INTERNAL;

import android.annotation.IntDef;
import android.annotation.RequiresPermission;
import android.content.Context;
import android.os.RemoteException;
@@ -46,6 +47,9 @@ public class BiometricManager {
     */
    public static final int ERROR_NO_BIOMETRICS = BiometricConstants.BIOMETRIC_ERROR_NO_BIOMETRICS;

    @IntDef({ERROR_NONE, ERROR_UNAVAILABLE, ERROR_NO_BIOMETRICS})
    @interface BiometricError {}

    private final Context mContext;
    private final IBiometricService mService;

@@ -68,7 +72,7 @@ public class BiometricManager {
     *     {@link #ERROR_NONE} if a biometric can currently be used (enrolled and available).
     */
    @RequiresPermission(USE_BIOMETRIC)
    public int canAuthenticate() {
    public @BiometricError int canAuthenticate() {
        if (mService != null) {
            try {
                return mService.canAuthenticate(mContext.getOpPackageName());