diff options
| author | Kevin Chyn <kchyn@google.com> | 2019-01-24 16:32:38 -0800 |
|---|---|---|
| committer | Kevin Chyn <kchyn@google.com> | 2019-01-25 18:09:03 -0800 |
| commit | 1b2137cf422f1025a37d97ede53b64cb0de01c68 (patch) | |
| tree | f5d6561fcc15df68a33f6bbe02693431faf50577 /core/java/android/app/KeyguardManager.java | |
| parent | 6a2121763c3f1455630d1a01930436aa2373015b (diff) | |
Deprecate CC and add BP#buildIntent()
To ensure future BP builder changes don't require a 1:1 addition to the
CC API, we're deprecating CC and moving the API to BP.
Since CDC is an activity, and BP can't receive onActivityResult from CDC,
we need to have BiometricService launch CDC. CDC will return auth/reject
results to BiometricService using a private protected aidl method, which
can then forward the reuslt to BP/app.
Bug: 111461540
Test: builds
Test: demo app, receives correct callbacks
Change-Id: I7111ca2842534a596302fe0eb7338fbfaca72eec
Diffstat (limited to 'core/java/android/app/KeyguardManager.java')
| -rw-r--r-- | core/java/android/app/KeyguardManager.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java index 75c90542ebce..f522d71afd08 100644 --- a/core/java/android/app/KeyguardManager.java +++ b/core/java/android/app/KeyguardManager.java @@ -29,6 +29,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; +import android.hardware.biometrics.BiometricPrompt; import android.os.Binder; import android.os.Build; import android.os.Handler; @@ -87,6 +88,12 @@ public class KeyguardManager { "android.app.action.CONFIRM_FRP_CREDENTIAL"; /** + * @hide + */ + public static final String EXTRA_BIOMETRIC_PROMPT_BUNDLE = + "android.app.extra.BIOMETRIC_PROMPT_BUNDLE"; + + /** * A CharSequence dialog title to show to the user when used with a * {@link #ACTION_CONFIRM_DEVICE_CREDENTIAL}. * @hide @@ -118,15 +125,19 @@ public class KeyguardManager { public static final int RESULT_ALTERNATE = 1; /** - * Get an intent to prompt the user to confirm credentials (pin, pattern or password) - * for the current user of the device. The caller is expected to launch this activity using - * {@link android.app.Activity#startActivityForResult(Intent, int)} and check for + * @deprecated see {@link BiometricPrompt.Builder#setEnableFallback(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 + * activity using {@link android.app.Activity#startActivityForResult(Intent, int)} and check for * {@link android.app.Activity#RESULT_OK} if the user successfully completes the challenge. * * @return the intent for launching the activity or null if no password is required. **/ + @Deprecated @RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN) - public Intent createConfirmDeviceCredentialIntent(CharSequence title, CharSequence description) { + public Intent createConfirmDeviceCredentialIntent(CharSequence title, + CharSequence description) { if (!isDeviceSecure()) return null; Intent intent = new Intent(ACTION_CONFIRM_DEVICE_CREDENTIAL); intent.putExtra(EXTRA_TITLE, title); |
