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

Commit 45d1f9d3 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Rename setEnableFallback to setAllowDeviceCredential

Also adds BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL constant

Fixes: 123725101

Test: Demo app
Test: CtsVerifier Biometric Test
Change-Id: Ib4d25438946c0ce476de8ef416d07e3c58152da9
parent a30095d9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -16513,6 +16513,7 @@ package android.hardware.biometrics {
    field public static final int BIOMETRIC_ERROR_LOCKOUT = 7; // 0x7
    field public static final int BIOMETRIC_ERROR_LOCKOUT_PERMANENT = 9; // 0x9
    field public static final int BIOMETRIC_ERROR_NO_BIOMETRICS = 11; // 0xb
    field public static final int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14; // 0xe
    field public static final int BIOMETRIC_ERROR_NO_SPACE = 4; // 0x4
    field public static final int BIOMETRIC_ERROR_TIMEOUT = 3; // 0x3
    field public static final int BIOMETRIC_ERROR_UNABLE_TO_PROCESS = 2; // 0x2
@@ -16535,8 +16536,8 @@ package android.hardware.biometrics {
  public static class BiometricPrompt.Builder {
    ctor public BiometricPrompt.Builder(android.content.Context);
    method public android.hardware.biometrics.BiometricPrompt build();
    method public android.hardware.biometrics.BiometricPrompt.Builder setAllowDeviceCredential(boolean);
    method public android.hardware.biometrics.BiometricPrompt.Builder setDescription(@NonNull CharSequence);
    method public android.hardware.biometrics.BiometricPrompt.Builder setEnableFallback(boolean);
    method public android.hardware.biometrics.BiometricPrompt.Builder setNegativeButton(@NonNull CharSequence, @NonNull java.util.concurrent.Executor, @NonNull android.content.DialogInterface.OnClickListener);
    method public android.hardware.biometrics.BiometricPrompt.Builder setRequireConfirmation(boolean);
    method public android.hardware.biometrics.BiometricPrompt.Builder setSubtitle(@NonNull CharSequence);
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ public class KeyguardManager {
    public static final int RESULT_ALTERNATE = 1;

    /**
     * @deprecated see {@link BiometricPrompt.Builder#setEnableFallback(boolean)}
     * @deprecated see {@link BiometricPrompt.Builder#setAllowDeviceCredential(boolean)}
     *
     * Get an intent to prompt the user to confirm credentials (pin, pattern, password or biometrics
     * if enrolled) for the current user of the device. The caller is expected to launch this
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.biometrics;

import android.annotation.UnsupportedAppUsage;
import android.app.KeyguardManager;


/**
@@ -125,6 +126,13 @@ public interface BiometricConstants {
     */
    int BIOMETRIC_ERROR_NEGATIVE_BUTTON = 13;

    /**
     * The device does not have pin, pattern, or password set up. See
     * {@link BiometricPrompt.Builder#setAllowDeviceCredential(boolean)} and
     * {@link KeyguardManager#isDeviceSecure()}
     */
    int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14;

    /**
     * @hide
     */
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.hardware.biometrics;

import android.app.KeyguardManager;
import android.hardware.face.FaceManager;

/**
@@ -133,6 +134,13 @@ public interface BiometricFaceConstants {
     */
    public static final int FACE_ERROR_NEGATIVE_BUTTON = 13;

    /**
     * The device does not have pin, pattern, or password set up. See
     * {@link BiometricPrompt.Builder#setAllowDeviceCredential(boolean)} and
     * {@link KeyguardManager#isDeviceSecure()}
     */
    public static final int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14;

    /**
     * @hide
     */
+9 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.biometrics;

import android.annotation.UnsupportedAppUsage;
import android.app.KeyguardManager;
import android.hardware.fingerprint.FingerprintManager;

/**
@@ -118,6 +119,14 @@ public interface BiometricFingerprintConstants {
     */
    public static final int FINGERPRINT_ERROR_NEGATIVE_BUTTON = 13;

    /**
     * The device does not have pin, pattern, or password set up. See
     * {@link BiometricPrompt.Builder#setAllowDeviceCredential(boolean)} and
     * {@link KeyguardManager#isDeviceSecure()}
     * @hide
     */
    public static final int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14;

    /**
     * @hide
     */
Loading