Merge "Rename BiometricDialog to BiometricPrompt." into pi-dev

This commit is contained in:
Vishwath Mohan
2018-04-05 21:23:32 +00:00
committed by Android (Google) Code Review
14 changed files with 103 additions and 103 deletions

View File

@@ -145,7 +145,7 @@ java_library {
":libcamera_client_framework_aidl", ":libcamera_client_framework_aidl",
"core/java/android/hardware/IConsumerIrService.aidl", "core/java/android/hardware/IConsumerIrService.aidl",
"core/java/android/hardware/ISerialManager.aidl", "core/java/android/hardware/ISerialManager.aidl",
"core/java/android/hardware/biometrics/IBiometricDialogReceiver.aidl", "core/java/android/hardware/biometrics/IBiometricPromptReceiver.aidl",
"core/java/android/hardware/display/IDisplayManager.aidl", "core/java/android/hardware/display/IDisplayManager.aidl",
"core/java/android/hardware/display/IDisplayManagerCallback.aidl", "core/java/android/hardware/display/IDisplayManagerCallback.aidl",
"core/java/android/hardware/display/IVirtualDisplayCallback.aidl", "core/java/android/hardware/display/IVirtualDisplayCallback.aidl",

View File

@@ -15758,9 +15758,9 @@ package android.hardware {
package android.hardware.biometrics { package android.hardware.biometrics {
public class BiometricDialog { public class BiometricPrompt {
method public void authenticate(android.hardware.biometrics.BiometricDialog.CryptoObject, android.os.CancellationSignal, java.util.concurrent.Executor, android.hardware.biometrics.BiometricDialog.AuthenticationCallback); method public void authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject, android.os.CancellationSignal, java.util.concurrent.Executor, android.hardware.biometrics.BiometricPrompt.AuthenticationCallback);
method public void authenticate(android.os.CancellationSignal, java.util.concurrent.Executor, android.hardware.biometrics.BiometricDialog.AuthenticationCallback); method public void authenticate(android.os.CancellationSignal, java.util.concurrent.Executor, android.hardware.biometrics.BiometricPrompt.AuthenticationCallback);
field public static final int BIOMETRIC_ACQUIRED_GOOD = 0; // 0x0 field public static final int BIOMETRIC_ACQUIRED_GOOD = 0; // 0x0
field public static final int BIOMETRIC_ACQUIRED_IMAGER_DIRTY = 3; // 0x3 field public static final int BIOMETRIC_ACQUIRED_IMAGER_DIRTY = 3; // 0x3
field public static final int BIOMETRIC_ACQUIRED_INSUFFICIENT = 2; // 0x2 field public static final int BIOMETRIC_ACQUIRED_INSUFFICIENT = 2; // 0x2
@@ -15780,31 +15780,31 @@ package android.hardware.biometrics {
field public static final int BIOMETRIC_ERROR_VENDOR = 8; // 0x8 field public static final int BIOMETRIC_ERROR_VENDOR = 8; // 0x8
} }
public static abstract class BiometricDialog.AuthenticationCallback { public static abstract class BiometricPrompt.AuthenticationCallback {
ctor public BiometricDialog.AuthenticationCallback(); ctor public BiometricPrompt.AuthenticationCallback();
method public void onAuthenticationError(int, java.lang.CharSequence); method public void onAuthenticationError(int, java.lang.CharSequence);
method public void onAuthenticationFailed(); method public void onAuthenticationFailed();
method public void onAuthenticationHelp(int, java.lang.CharSequence); method public void onAuthenticationHelp(int, java.lang.CharSequence);
method public void onAuthenticationSucceeded(android.hardware.biometrics.BiometricDialog.AuthenticationResult); method public void onAuthenticationSucceeded(android.hardware.biometrics.BiometricPrompt.AuthenticationResult);
} }
public static class BiometricDialog.AuthenticationResult { public static class BiometricPrompt.AuthenticationResult {
method public android.hardware.biometrics.BiometricDialog.CryptoObject getCryptoObject(); method public android.hardware.biometrics.BiometricPrompt.CryptoObject getCryptoObject();
} }
public static class BiometricDialog.Builder { public static class BiometricPrompt.Builder {
ctor public BiometricDialog.Builder(android.content.Context); ctor public BiometricPrompt.Builder(android.content.Context);
method public android.hardware.biometrics.BiometricDialog build(); method public android.hardware.biometrics.BiometricPrompt build();
method public android.hardware.biometrics.BiometricDialog.Builder setDescription(java.lang.CharSequence); method public android.hardware.biometrics.BiometricPrompt.Builder setDescription(java.lang.CharSequence);
method public android.hardware.biometrics.BiometricDialog.Builder setNegativeButton(java.lang.CharSequence, java.util.concurrent.Executor, android.content.DialogInterface.OnClickListener); method public android.hardware.biometrics.BiometricPrompt.Builder setNegativeButton(java.lang.CharSequence, java.util.concurrent.Executor, android.content.DialogInterface.OnClickListener);
method public android.hardware.biometrics.BiometricDialog.Builder setSubtitle(java.lang.CharSequence); method public android.hardware.biometrics.BiometricPrompt.Builder setSubtitle(java.lang.CharSequence);
method public android.hardware.biometrics.BiometricDialog.Builder setTitle(java.lang.CharSequence); method public android.hardware.biometrics.BiometricPrompt.Builder setTitle(java.lang.CharSequence);
} }
public static final class BiometricDialog.CryptoObject { public static final class BiometricPrompt.CryptoObject {
ctor public BiometricDialog.CryptoObject(java.security.Signature); ctor public BiometricPrompt.CryptoObject(java.security.Signature);
ctor public BiometricDialog.CryptoObject(javax.crypto.Cipher); ctor public BiometricPrompt.CryptoObject(javax.crypto.Cipher);
ctor public BiometricDialog.CryptoObject(javax.crypto.Mac); ctor public BiometricPrompt.CryptoObject(javax.crypto.Mac);
method public javax.crypto.Cipher getCipher(); method public javax.crypto.Cipher getCipher();
method public javax.crypto.Mac getMac(); method public javax.crypto.Mac getMac();
method public java.security.Signature getSignature(); method public java.security.Signature getSignature();

View File

@@ -38,7 +38,7 @@ import javax.crypto.Mac;
/** /**
* A class that manages a system-provided biometric dialog. * A class that manages a system-provided biometric dialog.
*/ */
public class BiometricDialog implements BiometricAuthenticator, BiometricConstants { public class BiometricPrompt implements BiometricAuthenticator, BiometricConstants {
/** /**
* @hide * @hide
@@ -190,11 +190,11 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
} }
/** /**
* Creates a {@link BiometricDialog}. * Creates a {@link BiometricPrompt}.
* @return a {@link BiometricDialog} * @return a {@link BiometricPrompt}
* @throws IllegalArgumentException if any of the required fields are not set. * @throws IllegalArgumentException if any of the required fields are not set.
*/ */
public BiometricDialog build() { public BiometricPrompt build() {
final CharSequence title = mBundle.getCharSequence(KEY_TITLE); final CharSequence title = mBundle.getCharSequence(KEY_TITLE);
final CharSequence negative = mBundle.getCharSequence(KEY_NEGATIVE_TEXT); final CharSequence negative = mBundle.getCharSequence(KEY_NEGATIVE_TEXT);
@@ -203,7 +203,7 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
} else if (TextUtils.isEmpty(negative)) { } else if (TextUtils.isEmpty(negative)) {
throw new IllegalArgumentException("Negative text must be set and non-empty"); throw new IllegalArgumentException("Negative text must be set and non-empty");
} }
return new BiometricDialog(mContext, mBundle, mPositiveButtonInfo, mNegativeButtonInfo); return new BiometricPrompt(mContext, mBundle, mPositiveButtonInfo, mNegativeButtonInfo);
} }
} }
@@ -213,7 +213,7 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
private ButtonInfo mPositiveButtonInfo; private ButtonInfo mPositiveButtonInfo;
private ButtonInfo mNegativeButtonInfo; private ButtonInfo mNegativeButtonInfo;
IBiometricDialogReceiver mDialogReceiver = new IBiometricDialogReceiver.Stub() { IBiometricPromptReceiver mDialogReceiver = new IBiometricPromptReceiver.Stub() {
@Override @Override
public void onDialogDismissed(int reason) { public void onDialogDismissed(int reason) {
// Check the reason and invoke OnClickListener(s) if necessary // Check the reason and invoke OnClickListener(s) if necessary
@@ -229,7 +229,7 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
} }
}; };
private BiometricDialog(Context context, Bundle bundle, private BiometricPrompt(Context context, Bundle bundle,
ButtonInfo positiveButtonInfo, ButtonInfo negativeButtonInfo) { ButtonInfo positiveButtonInfo, ButtonInfo negativeButtonInfo) {
mBundle = bundle; mBundle = bundle;
mPositiveButtonInfo = positiveButtonInfo; mPositiveButtonInfo = positiveButtonInfo;
@@ -239,7 +239,7 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
} }
/** /**
* A wrapper class for the crypto objects supported by BiometricDialog. Currently the framework * A wrapper class for the crypto objects supported by BiometricPrompt. Currently the framework
* supports {@link Signature}, {@link Cipher} and {@link Mac} objects. * supports {@link Signature}, {@link Cipher} and {@link Mac} objects.
*/ */
public static final class CryptoObject extends android.hardware.biometrics.CryptoObject { public static final class CryptoObject extends android.hardware.biometrics.CryptoObject {
@@ -308,8 +308,8 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
} }
/** /**
* Callback structure provided to {@link BiometricDialog#authenticate(CancellationSignal, * Callback structure provided to {@link BiometricPrompt#authenticate(CancellationSignal,
* Executor, AuthenticationCallback)} or {@link BiometricDialog#authenticate(CryptoObject, * Executor, AuthenticationCallback)} or {@link BiometricPrompt#authenticate(CryptoObject,
* CancellationSignal, Executor, AuthenticationCallback)}. Users must provide an implementation * CancellationSignal, Executor, AuthenticationCallback)}. Users must provide an implementation
* of this for listening to authentication events. * of this for listening to authentication events.
*/ */
@@ -378,7 +378,7 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
@NonNull CancellationSignal cancel, @NonNull CancellationSignal cancel,
@NonNull @CallbackExecutor Executor executor, @NonNull @CallbackExecutor Executor executor,
@NonNull BiometricAuthenticator.AuthenticationCallback callback) { @NonNull BiometricAuthenticator.AuthenticationCallback callback) {
if (!(callback instanceof BiometricDialog.AuthenticationCallback)) { if (!(callback instanceof BiometricPrompt.AuthenticationCallback)) {
throw new IllegalArgumentException("Callback cannot be casted"); throw new IllegalArgumentException("Callback cannot be casted");
} }
authenticate(crypto, cancel, executor, (AuthenticationCallback) callback); authenticate(crypto, cancel, executor, (AuthenticationCallback) callback);
@@ -395,7 +395,7 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
public void authenticate(@NonNull CancellationSignal cancel, public void authenticate(@NonNull CancellationSignal cancel,
@NonNull @CallbackExecutor Executor executor, @NonNull @CallbackExecutor Executor executor,
@NonNull BiometricAuthenticator.AuthenticationCallback callback) { @NonNull BiometricAuthenticator.AuthenticationCallback callback) {
if (!(callback instanceof BiometricDialog.AuthenticationCallback)) { if (!(callback instanceof BiometricPrompt.AuthenticationCallback)) {
throw new IllegalArgumentException("Callback cannot be casted"); throw new IllegalArgumentException("Callback cannot be casted");
} }
authenticate(cancel, executor, (AuthenticationCallback) callback); authenticate(cancel, executor, (AuthenticationCallback) callback);
@@ -410,8 +410,8 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
* operation can be canceled by using the provided cancel object. The application will receive * operation can be canceled by using the provided cancel object. The application will receive
* authentication errors through {@link AuthenticationCallback}, and button events through the * authentication errors through {@link AuthenticationCallback}, and button events through the
* corresponding callback set in {@link Builder#setNegativeButton(CharSequence, Executor, * corresponding callback set in {@link Builder#setNegativeButton(CharSequence, Executor,
* DialogInterface.OnClickListener)}. It is safe to reuse the {@link BiometricDialog} object, * DialogInterface.OnClickListener)}. It is safe to reuse the {@link BiometricPrompt} object,
* and calling {@link BiometricDialog#authenticate( CancellationSignal, Executor, * and calling {@link BiometricPrompt#authenticate( CancellationSignal, Executor,
* AuthenticationCallback)} while an existing authentication attempt is occurring will stop the * AuthenticationCallback)} while an existing authentication attempt is occurring will stop the
* previous client and start a new authentication. The interrupted client will receive a * previous client and start a new authentication. The interrupted client will receive a
* cancelled notification through {@link AuthenticationCallback#onAuthenticationError(int, * cancelled notification through {@link AuthenticationCallback#onAuthenticationError(int,
@@ -445,8 +445,8 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
* provided cancel object. The application will receive authentication errors through {@link * provided cancel object. The application will receive authentication errors through {@link
* AuthenticationCallback}, and button events through the corresponding callback set in {@link * AuthenticationCallback}, and button events through the corresponding callback set in {@link
* Builder#setNegativeButton(CharSequence, Executor, DialogInterface.OnClickListener)}. It is * Builder#setNegativeButton(CharSequence, Executor, DialogInterface.OnClickListener)}. It is
* safe to reuse the {@link BiometricDialog} object, and calling {@link * safe to reuse the {@link BiometricPrompt} object, and calling {@link
* BiometricDialog#authenticate(CancellationSignal, Executor, AuthenticationCallback)} while * BiometricPrompt#authenticate(CancellationSignal, Executor, AuthenticationCallback)} while
* an existing authentication attempt is occurring will stop the previous client and start a new * an existing authentication attempt is occurring will stop the previous client and start a new
* authentication. The interrupted client will receive a cancelled notification through {@link * authentication. The interrupted client will receive a cancelled notification through {@link
* AuthenticationCallback#onAuthenticationError(int, CharSequence)}. * AuthenticationCallback#onAuthenticationError(int, CharSequence)}.
@@ -470,15 +470,15 @@ public class BiometricDialog implements BiometricAuthenticator, BiometricConstan
private boolean handlePreAuthenticationErrors(AuthenticationCallback callback, private boolean handlePreAuthenticationErrors(AuthenticationCallback callback,
Executor executor) { Executor executor) {
if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) { if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
sendError(BiometricDialog.BIOMETRIC_ERROR_HW_NOT_PRESENT, callback, sendError(BiometricPrompt.BIOMETRIC_ERROR_HW_NOT_PRESENT, callback,
executor); executor);
return true; return true;
} else if (!mFingerprintManager.isHardwareDetected()) { } else if (!mFingerprintManager.isHardwareDetected()) {
sendError(BiometricDialog.BIOMETRIC_ERROR_HW_UNAVAILABLE, callback, sendError(BiometricPrompt.BIOMETRIC_ERROR_HW_UNAVAILABLE, callback,
executor); executor);
return true; return true;
} else if (!mFingerprintManager.hasEnrolledFingerprints()) { } else if (!mFingerprintManager.hasEnrolledFingerprints()) {
sendError(BiometricDialog.BIOMETRIC_ERROR_NO_BIOMETRICS, callback, sendError(BiometricPrompt.BIOMETRIC_ERROR_NO_BIOMETRICS, callback,
executor); executor);
return true; return true;
} }

View File

@@ -19,9 +19,9 @@ import android.os.Bundle;
import android.os.UserHandle; import android.os.UserHandle;
/** /**
* Communication channel from the BiometricDialog (SysUI) back to AuthenticationClient. * Communication channel from the BiometricPrompt (SysUI) back to AuthenticationClient.
* @hide * @hide
*/ */
oneway interface IBiometricDialogReceiver { oneway interface IBiometricPromptReceiver {
void onDialogDismissed(int reason); void onDialogDismissed(int reason);
} }

View File

@@ -31,9 +31,9 @@ import android.app.ActivityManager;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.hardware.biometrics.BiometricAuthenticator; import android.hardware.biometrics.BiometricAuthenticator;
import android.hardware.biometrics.BiometricDialog;
import android.hardware.biometrics.BiometricFingerprintConstants; import android.hardware.biometrics.BiometricFingerprintConstants;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.BiometricPrompt;
import android.hardware.biometrics.IBiometricPromptReceiver;
import android.os.Binder; import android.os.Binder;
import android.os.Bundle; import android.os.Bundle;
import android.os.CancellationSignal; import android.os.CancellationSignal;
@@ -57,7 +57,7 @@ import javax.crypto.Mac;
/** /**
* A class that coordinates access to the fingerprint hardware. * A class that coordinates access to the fingerprint hardware.
* @deprecated See {@link BiometricDialog} which shows a system-provided dialog upon starting * @deprecated See {@link BiometricPrompt} which shows a system-provided dialog upon starting
* authentication. In a world where devices may have different types of biometric authentication, * authentication. In a world where devices may have different types of biometric authentication,
* it's much more realistic to have a system-provided authentication dialog since the method may * it's much more realistic to have a system-provided authentication dialog since the method may
* vary by vendor/device. * vary by vendor/device.
@@ -111,7 +111,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
/** /**
* A wrapper class for the crypto objects supported by FingerprintManager. Currently the * A wrapper class for the crypto objects supported by FingerprintManager. Currently the
* framework supports {@link Signature}, {@link Cipher} and {@link Mac} objects. * framework supports {@link Signature}, {@link Cipher} and {@link Mac} objects.
* @deprecated See {@link android.hardware.biometrics.BiometricDialog.CryptoObject} * @deprecated See {@link android.hardware.biometrics.BiometricPrompt.CryptoObject}
*/ */
@Deprecated @Deprecated
public static final class CryptoObject extends android.hardware.biometrics.CryptoObject { public static final class CryptoObject extends android.hardware.biometrics.CryptoObject {
@@ -155,7 +155,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
/** /**
* Container for callback data from {@link FingerprintManager#authenticate(CryptoObject, * Container for callback data from {@link FingerprintManager#authenticate(CryptoObject,
* CancellationSignal, int, AuthenticationCallback, Handler)}. * CancellationSignal, int, AuthenticationCallback, Handler)}.
* @deprecated See {@link android.hardware.biometrics.BiometricDialog.AuthenticationResult} * @deprecated See {@link android.hardware.biometrics.BiometricPrompt.AuthenticationResult}
*/ */
@Deprecated @Deprecated
public static class AuthenticationResult { public static class AuthenticationResult {
@@ -204,7 +204,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
* FingerprintManager#authenticate(CryptoObject, CancellationSignal, * FingerprintManager#authenticate(CryptoObject, CancellationSignal,
* int, AuthenticationCallback, Handler) } must provide an implementation of this for listening to * int, AuthenticationCallback, Handler) } must provide an implementation of this for listening to
* fingerprint events. * fingerprint events.
* @deprecated See {@link android.hardware.biometrics.BiometricDialog.AuthenticationCallback} * @deprecated See {@link android.hardware.biometrics.BiometricPrompt.AuthenticationCallback}
*/ */
@Deprecated @Deprecated
public static abstract class AuthenticationCallback public static abstract class AuthenticationCallback
@@ -378,10 +378,10 @@ public class FingerprintManager implements BiometricFingerprintConstants {
* by <a href="{@docRoot}training/articles/keystore.html">Android Keystore * by <a href="{@docRoot}training/articles/keystore.html">Android Keystore
* facility</a>. * facility</a>.
* @throws IllegalStateException if the crypto primitive is not initialized. * @throws IllegalStateException if the crypto primitive is not initialized.
* @deprecated See {@link BiometricDialog#authenticate(CancellationSignal, Executor, * @deprecated See {@link BiometricPrompt#authenticate(CancellationSignal, Executor,
* BiometricDialog.AuthenticationCallback)} and {@link BiometricDialog#authenticate( * BiometricPrompt.AuthenticationCallback)} and {@link BiometricPrompt#authenticate(
* BiometricDialog.CryptoObject, CancellationSignal, Executor, * BiometricPrompt.CryptoObject, CancellationSignal, Executor,
* BiometricDialog.AuthenticationCallback)} * BiometricPrompt.AuthenticationCallback)}
*/ */
@Deprecated @Deprecated
@RequiresPermission(anyOf = {USE_BIOMETRIC, USE_FINGERPRINT}) @RequiresPermission(anyOf = {USE_BIOMETRIC, USE_FINGERPRINT})
@@ -444,7 +444,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
/** /**
* Per-user version, see {@link FingerprintManager#authenticate(CryptoObject, * Per-user version, see {@link FingerprintManager#authenticate(CryptoObject,
* CancellationSignal, Bundle, Executor, IBiometricDialogReceiver, AuthenticationCallback)} * CancellationSignal, Bundle, Executor, IBiometricPromptReceiver, AuthenticationCallback)}
* @param userId the user ID that the fingerprint hardware will authenticate for. * @param userId the user ID that the fingerprint hardware will authenticate for.
*/ */
private void authenticate(int userId, private void authenticate(int userId,
@@ -452,7 +452,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
@NonNull CancellationSignal cancel, @NonNull CancellationSignal cancel,
@NonNull Bundle bundle, @NonNull Bundle bundle,
@NonNull @CallbackExecutor Executor executor, @NonNull @CallbackExecutor Executor executor,
@NonNull IBiometricDialogReceiver receiver, @NonNull IBiometricPromptReceiver receiver,
@NonNull BiometricAuthenticator.AuthenticationCallback callback) { @NonNull BiometricAuthenticator.AuthenticationCallback callback) {
mCryptoObject = crypto; mCryptoObject = crypto;
if (cancel.isCanceled()) { if (cancel.isCanceled()) {
@@ -480,8 +480,8 @@ public class FingerprintManager implements BiometricFingerprintConstants {
} }
/** /**
* Private method, see {@link BiometricDialog#authenticate(CancellationSignal, Executor, * Private method, see {@link BiometricPrompt#authenticate(CancellationSignal, Executor,
* BiometricDialog.AuthenticationCallback)} * BiometricPrompt.AuthenticationCallback)}
* @param cancel * @param cancel
* @param executor * @param executor
* @param callback * @param callback
@@ -491,7 +491,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
@NonNull CancellationSignal cancel, @NonNull CancellationSignal cancel,
@NonNull Bundle bundle, @NonNull Bundle bundle,
@NonNull @CallbackExecutor Executor executor, @NonNull @CallbackExecutor Executor executor,
@NonNull IBiometricDialogReceiver receiver, @NonNull IBiometricPromptReceiver receiver,
@NonNull BiometricAuthenticator.AuthenticationCallback callback) { @NonNull BiometricAuthenticator.AuthenticationCallback callback) {
if (cancel == null) { if (cancel == null) {
throw new IllegalArgumentException("Must supply a cancellation signal"); throw new IllegalArgumentException("Must supply a cancellation signal");
@@ -512,8 +512,8 @@ public class FingerprintManager implements BiometricFingerprintConstants {
} }
/** /**
* Private method, see {@link BiometricDialog#authenticate(BiometricDialog.CryptoObject, * Private method, see {@link BiometricPrompt#authenticate(BiometricPrompt.CryptoObject,
* CancellationSignal, Executor, BiometricDialog.AuthenticationCallback)} * CancellationSignal, Executor, BiometricPrompt.AuthenticationCallback)}
* @param crypto * @param crypto
* @param cancel * @param cancel
* @param executor * @param executor
@@ -524,7 +524,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
@NonNull CancellationSignal cancel, @NonNull CancellationSignal cancel,
@NonNull Bundle bundle, @NonNull Bundle bundle,
@NonNull @CallbackExecutor Executor executor, @NonNull @CallbackExecutor Executor executor,
@NonNull IBiometricDialogReceiver receiver, @NonNull IBiometricPromptReceiver receiver,
@NonNull BiometricAuthenticator.AuthenticationCallback callback) { @NonNull BiometricAuthenticator.AuthenticationCallback callback) {
if (crypto == null) { if (crypto == null) {
throw new IllegalArgumentException("Must supply a crypto object"); throw new IllegalArgumentException("Must supply a crypto object");
@@ -743,7 +743,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
* Determine if there is at least one fingerprint enrolled. * Determine if there is at least one fingerprint enrolled.
* *
* @return true if at least one fingerprint is enrolled, false otherwise * @return true if at least one fingerprint is enrolled, false otherwise
* @deprecated See {@link BiometricDialog} and * @deprecated See {@link BiometricPrompt} and
* {@link FingerprintManager#FINGERPRINT_ERROR_NO_FINGERPRINTS} * {@link FingerprintManager#FINGERPRINT_ERROR_NO_FINGERPRINTS}
*/ */
@Deprecated @Deprecated
@@ -777,7 +777,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
* Determine if fingerprint hardware is present and functional. * Determine if fingerprint hardware is present and functional.
* *
* @return true if hardware is present and functional, false otherwise. * @return true if hardware is present and functional, false otherwise.
* @deprecated See {@link BiometricDialog} and * @deprecated See {@link BiometricPrompt} and
* {@link FingerprintManager#FINGERPRINT_ERROR_HW_UNAVAILABLE} * {@link FingerprintManager#FINGERPRINT_ERROR_HW_UNAVAILABLE}
*/ */
@Deprecated @Deprecated
@@ -1158,7 +1158,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
@Override // binder call @Override // binder call
public void onError(long deviceId, int error, int vendorCode) { public void onError(long deviceId, int error, int vendorCode) {
if (mExecutor != null) { if (mExecutor != null) {
// BiometricDialog case // BiometricPrompt case
if (error == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED) { if (error == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED) {
// User tapped somewhere to cancel, the biometric dialog is already dismissed. // User tapped somewhere to cancel, the biometric dialog is already dismissed.
mExecutor.execute(() -> { mExecutor.execute(() -> {
@@ -1172,7 +1172,7 @@ public class FingerprintManager implements BiometricFingerprintConstants {
mExecutor.execute(() -> { mExecutor.execute(() -> {
sendErrorResult(deviceId, error, vendorCode); sendErrorResult(deviceId, error, vendorCode);
}); });
}, BiometricDialog.HIDE_DIALOG_DELAY); }, BiometricPrompt.HIDE_DIALOG_DELAY);
} }
} else { } else {
mHandler.obtainMessage(MSG_ERROR, error, vendorCode, deviceId).sendToTarget(); mHandler.obtainMessage(MSG_ERROR, error, vendorCode, deviceId).sendToTarget();

View File

@@ -16,7 +16,7 @@
package android.hardware.fingerprint; package android.hardware.fingerprint;
import android.os.Bundle; import android.os.Bundle;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import android.hardware.fingerprint.IFingerprintClientActiveCallback; import android.hardware.fingerprint.IFingerprintClientActiveCallback;
import android.hardware.fingerprint.IFingerprintServiceReceiver; import android.hardware.fingerprint.IFingerprintServiceReceiver;
import android.hardware.fingerprint.IFingerprintServiceLockoutResetCallback; import android.hardware.fingerprint.IFingerprintServiceLockoutResetCallback;
@@ -31,7 +31,7 @@ interface IFingerprintService {
// Authenticate the given sessionId with a fingerprint // Authenticate the given sessionId with a fingerprint
void authenticate(IBinder token, long sessionId, int userId, void authenticate(IBinder token, long sessionId, int userId,
IFingerprintServiceReceiver receiver, int flags, String opPackageName, IFingerprintServiceReceiver receiver, int flags, String opPackageName,
in Bundle bundle, IBiometricDialogReceiver dialogReceiver); in Bundle bundle, IBiometricPromptReceiver dialogReceiver);
// Cancel authentication for the given sessionId // Cancel authentication for the given sessionId
void cancelAuthentication(IBinder token, String opPackageName); void cancelAuthentication(IBinder token, String opPackageName);

View File

@@ -18,7 +18,7 @@ package com.android.internal.statusbar;
import android.content.ComponentName; import android.content.ComponentName;
import android.graphics.Rect; import android.graphics.Rect;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import android.os.Bundle; import android.os.Bundle;
import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification;
@@ -141,7 +141,7 @@ oneway interface IStatusBar
void showShutdownUi(boolean isReboot, String reason); void showShutdownUi(boolean isReboot, String reason);
// Used to show the dialog when FingerprintService starts authentication // Used to show the dialog when FingerprintService starts authentication
void showFingerprintDialog(in Bundle bundle, IBiometricDialogReceiver receiver); void showFingerprintDialog(in Bundle bundle, IBiometricPromptReceiver receiver);
// Used to hide the dialog when a finger is authenticated // Used to hide the dialog when a finger is authenticated
void onFingerprintAuthenticated(); void onFingerprintAuthenticated();
// Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc

View File

@@ -20,7 +20,7 @@ import android.content.ComponentName;
import android.graphics.Rect; import android.graphics.Rect;
import android.os.Bundle; import android.os.Bundle;
import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import com.android.internal.statusbar.IStatusBar; import com.android.internal.statusbar.IStatusBar;
import com.android.internal.statusbar.StatusBarIcon; import com.android.internal.statusbar.StatusBarIcon;
@@ -88,7 +88,7 @@ interface IStatusBarService
void showPinningEscapeToast(); void showPinningEscapeToast();
// Used to show the dialog when FingerprintService starts authentication // Used to show the dialog when FingerprintService starts authentication
void showFingerprintDialog(in Bundle bundle, IBiometricDialogReceiver receiver); void showFingerprintDialog(in Bundle bundle, IBiometricPromptReceiver receiver);
// Used to hide the dialog when a finger is authenticated // Used to hide the dialog when a finger is authenticated
void onFingerprintAuthenticated(); void onFingerprintAuthenticated();
// Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc

View File

@@ -18,8 +18,8 @@ package com.android.systemui.fingerprint;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.hardware.biometrics.BiometricDialog; import android.hardware.biometrics.BiometricPrompt;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
@@ -48,7 +48,7 @@ public class FingerprintDialogImpl extends SystemUI implements CommandQueue.Call
private FingerprintDialogView mDialogView; private FingerprintDialogView mDialogView;
private WindowManager mWindowManager; private WindowManager mWindowManager;
private IBiometricDialogReceiver mReceiver; private IBiometricPromptReceiver mReceiver;
private boolean mDialogShowing; private boolean mDialogShowing;
private Handler mHandler = new Handler() { private Handler mHandler = new Handler() {
@@ -97,7 +97,7 @@ public class FingerprintDialogImpl extends SystemUI implements CommandQueue.Call
} }
@Override @Override
public void showFingerprintDialog(Bundle bundle, IBiometricDialogReceiver receiver) { public void showFingerprintDialog(Bundle bundle, IBiometricPromptReceiver receiver) {
if (DEBUG) Log.d(TAG, "showFingerprintDialog"); if (DEBUG) Log.d(TAG, "showFingerprintDialog");
// Remove these messages as they are part of the previous client // Remove these messages as they are part of the previous client
mHandler.removeMessages(MSG_FINGERPRINT_ERROR); mHandler.removeMessages(MSG_FINGERPRINT_ERROR);
@@ -139,7 +139,7 @@ public class FingerprintDialogImpl extends SystemUI implements CommandQueue.Call
Log.w(TAG, "Dialog already showing"); Log.w(TAG, "Dialog already showing");
return; return;
} }
mReceiver = (IBiometricDialogReceiver) args.arg2; mReceiver = (IBiometricPromptReceiver) args.arg2;
mDialogView.setBundle((Bundle)args.arg1); mDialogView.setBundle((Bundle)args.arg1);
mWindowManager.addView(mDialogView, mDialogView.getLayoutParams()); mWindowManager.addView(mDialogView, mDialogView.getLayoutParams());
mDialogShowing = true; mDialogShowing = true;
@@ -177,7 +177,7 @@ public class FingerprintDialogImpl extends SystemUI implements CommandQueue.Call
} }
if (userCanceled) { if (userCanceled) {
try { try {
mReceiver.onDialogDismissed(BiometricDialog.DISMISSED_REASON_USER_CANCEL); mReceiver.onDialogDismissed(BiometricPrompt.DISMISSED_REASON_USER_CANCEL);
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(TAG, "RemoteException when hiding dialog", e); Log.e(TAG, "RemoteException when hiding dialog", e);
} }
@@ -193,7 +193,7 @@ public class FingerprintDialogImpl extends SystemUI implements CommandQueue.Call
return; return;
} }
try { try {
mReceiver.onDialogDismissed(BiometricDialog.DISMISSED_REASON_NEGATIVE); mReceiver.onDialogDismissed(BiometricPrompt.DISMISSED_REASON_NEGATIVE);
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(TAG, "Remote exception when handling negative button", e); Log.e(TAG, "Remote exception when handling negative button", e);
} }
@@ -206,7 +206,7 @@ public class FingerprintDialogImpl extends SystemUI implements CommandQueue.Call
return; return;
} }
try { try {
mReceiver.onDialogDismissed(BiometricDialog.DISMISSED_REASON_POSITIVE); mReceiver.onDialogDismissed(BiometricPrompt.DISMISSED_REASON_POSITIVE);
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(TAG, "Remote exception when handling positive button", e); Log.e(TAG, "Remote exception when handling positive button", e);
} }

View File

@@ -22,7 +22,7 @@ import android.graphics.PixelFormat;
import android.graphics.PorterDuff; import android.graphics.PorterDuff;
import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.AnimatedVectorDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.hardware.biometrics.BiometricDialog; import android.hardware.biometrics.BiometricPrompt;
import android.os.Binder; import android.os.Binder;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
@@ -161,10 +161,10 @@ public class FingerprintDialogView extends LinearLayout {
mLastState = STATE_NONE; mLastState = STATE_NONE;
updateFingerprintIcon(STATE_FINGERPRINT); updateFingerprintIcon(STATE_FINGERPRINT);
title.setText(mBundle.getCharSequence(BiometricDialog.KEY_TITLE)); title.setText(mBundle.getCharSequence(BiometricPrompt.KEY_TITLE));
title.setSelected(true); title.setSelected(true);
final CharSequence subtitleText = mBundle.getCharSequence(BiometricDialog.KEY_SUBTITLE); final CharSequence subtitleText = mBundle.getCharSequence(BiometricPrompt.KEY_SUBTITLE);
if (subtitleText == null) { if (subtitleText == null) {
subtitle.setVisibility(View.GONE); subtitle.setVisibility(View.GONE);
} else { } else {
@@ -172,18 +172,18 @@ public class FingerprintDialogView extends LinearLayout {
subtitle.setText(subtitleText); subtitle.setText(subtitleText);
} }
final CharSequence descriptionText = mBundle.getCharSequence(BiometricDialog.KEY_DESCRIPTION); final CharSequence descriptionText = mBundle.getCharSequence(BiometricPrompt.KEY_DESCRIPTION);
if (descriptionText == null) { if (descriptionText == null) {
subtitle.setVisibility(View.VISIBLE); subtitle.setVisibility(View.VISIBLE);
description.setVisibility(View.GONE); description.setVisibility(View.GONE);
} else { } else {
description.setText(mBundle.getCharSequence(BiometricDialog.KEY_DESCRIPTION)); description.setText(mBundle.getCharSequence(BiometricPrompt.KEY_DESCRIPTION));
} }
negative.setText(mBundle.getCharSequence(BiometricDialog.KEY_NEGATIVE_TEXT)); negative.setText(mBundle.getCharSequence(BiometricPrompt.KEY_NEGATIVE_TEXT));
final CharSequence positiveText = final CharSequence positiveText =
mBundle.getCharSequence(BiometricDialog.KEY_POSITIVE_TEXT); mBundle.getCharSequence(BiometricPrompt.KEY_POSITIVE_TEXT);
positive.setText(positiveText); // needs to be set for marquee to work positive.setText(positiveText); // needs to be set for marquee to work
if (positiveText != null) { if (positiveText != null) {
positive.setVisibility(View.VISIBLE); positive.setVisibility(View.VISIBLE);
@@ -269,7 +269,7 @@ public class FingerprintDialogView extends LinearLayout {
mErrorText.setTextColor(mErrorColor); mErrorText.setTextColor(mErrorColor);
mErrorText.setContentDescription(message); mErrorText.setContentDescription(message);
mHandler.sendMessageDelayed(mHandler.obtainMessage(FingerprintDialogImpl.MSG_CLEAR_MESSAGE), mHandler.sendMessageDelayed(mHandler.obtainMessage(FingerprintDialogImpl.MSG_CLEAR_MESSAGE),
BiometricDialog.HIDE_DIALOG_DELAY); BiometricPrompt.HIDE_DIALOG_DELAY);
} }
public void showHelpMessage(String message) { public void showHelpMessage(String message) {
@@ -279,7 +279,7 @@ public class FingerprintDialogView extends LinearLayout {
public void showErrorMessage(String error) { public void showErrorMessage(String error) {
showTemporaryMessage(error); showTemporaryMessage(error);
mHandler.sendMessageDelayed(mHandler.obtainMessage(FingerprintDialogImpl.MSG_HIDE_DIALOG, mHandler.sendMessageDelayed(mHandler.obtainMessage(FingerprintDialogImpl.MSG_HIDE_DIALOG,
false /* userCanceled */), BiometricDialog.HIDE_DIALOG_DELAY); false /* userCanceled */), BiometricPrompt.HIDE_DIALOG_DELAY);
} }
private void updateFingerprintIcon(int newState) { private void updateFingerprintIcon(int newState) {

View File

@@ -18,7 +18,7 @@ package com.android.systemui.statusbar;
import android.content.ComponentName; import android.content.ComponentName;
import android.graphics.Rect; import android.graphics.Rect;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.IBinder; import android.os.IBinder;
@@ -160,7 +160,7 @@ public class CommandQueue extends IStatusBar.Stub {
default void onRotationProposal(int rotation, boolean isValid) { } default void onRotationProposal(int rotation, boolean isValid) { }
default void showFingerprintDialog(Bundle bundle, IBiometricDialogReceiver receiver) { } default void showFingerprintDialog(Bundle bundle, IBiometricPromptReceiver receiver) { }
default void onFingerprintAuthenticated() { } default void onFingerprintAuthenticated() { }
default void onFingerprintHelp(String message) { } default void onFingerprintHelp(String message) { }
default void onFingerprintError(String error) { } default void onFingerprintError(String error) { }
@@ -513,7 +513,7 @@ public class CommandQueue extends IStatusBar.Stub {
} }
@Override @Override
public void showFingerprintDialog(Bundle bundle, IBiometricDialogReceiver receiver) { public void showFingerprintDialog(Bundle bundle, IBiometricPromptReceiver receiver) {
synchronized (mLock) { synchronized (mLock) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = bundle; args.arg1 = bundle;
@@ -759,7 +759,7 @@ public class CommandQueue extends IStatusBar.Stub {
for (int i = 0; i < mCallbacks.size(); i++) { for (int i = 0; i < mCallbacks.size(); i++) {
mCallbacks.get(i).showFingerprintDialog( mCallbacks.get(i).showFingerprintDialog(
(Bundle)((SomeArgs)msg.obj).arg1, (Bundle)((SomeArgs)msg.obj).arg1,
(IBiometricDialogReceiver)((SomeArgs)msg.obj).arg2); (IBiometricPromptReceiver)((SomeArgs)msg.obj).arg2);
} }
break; break;
case MSG_FINGERPRINT_AUTHENTICATED: case MSG_FINGERPRINT_AUTHENTICATED:

View File

@@ -18,8 +18,8 @@ package com.android.server.fingerprint;
import android.content.Context; import android.content.Context;
import android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint; import android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint;
import android.hardware.biometrics.BiometricDialog; import android.hardware.biometrics.BiometricPrompt;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import android.hardware.fingerprint.Fingerprint; import android.hardware.fingerprint.Fingerprint;
import android.hardware.fingerprint.FingerprintManager; import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.IFingerprintServiceReceiver; import android.hardware.fingerprint.IFingerprintServiceReceiver;
@@ -46,8 +46,8 @@ public abstract class AuthenticationClient extends ClientMonitor {
public static final int LOCKOUT_PERMANENT = 2; public static final int LOCKOUT_PERMANENT = 2;
// Callback mechanism received from the client // Callback mechanism received from the client
// (BiometricDialog -> FingerprintManager -> FingerprintService -> AuthenticationClient) // (BiometricPrompt -> FingerprintManager -> FingerprintService -> AuthenticationClient)
private IBiometricDialogReceiver mDialogReceiverFromClient; private IBiometricPromptReceiver mDialogReceiverFromClient;
private Bundle mBundle; private Bundle mBundle;
private IStatusBarService mStatusBarService; private IStatusBarService mStatusBarService;
private boolean mInLockout; private boolean mInLockout;
@@ -55,13 +55,13 @@ public abstract class AuthenticationClient extends ClientMonitor {
protected boolean mDialogDismissed; protected boolean mDialogDismissed;
// Receives events from SystemUI and handles them before forwarding them to FingerprintDialog // Receives events from SystemUI and handles them before forwarding them to FingerprintDialog
protected IBiometricDialogReceiver mDialogReceiver = new IBiometricDialogReceiver.Stub() { protected IBiometricPromptReceiver mDialogReceiver = new IBiometricPromptReceiver.Stub() {
@Override // binder call @Override // binder call
public void onDialogDismissed(int reason) { public void onDialogDismissed(int reason) {
if (mBundle != null && mDialogReceiverFromClient != null) { if (mBundle != null && mDialogReceiverFromClient != null) {
try { try {
mDialogReceiverFromClient.onDialogDismissed(reason); mDialogReceiverFromClient.onDialogDismissed(reason);
if (reason == BiometricDialog.DISMISSED_REASON_USER_CANCEL) { if (reason == BiometricPrompt.DISMISSED_REASON_USER_CANCEL) {
onError(FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED, onError(FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED,
0 /* vendorCode */); 0 /* vendorCode */);
} }
@@ -88,7 +88,7 @@ public abstract class AuthenticationClient extends ClientMonitor {
public AuthenticationClient(Context context, long halDeviceId, IBinder token, public AuthenticationClient(Context context, long halDeviceId, IBinder token,
IFingerprintServiceReceiver receiver, int targetUserId, int groupId, long opId, IFingerprintServiceReceiver receiver, int targetUserId, int groupId, long opId,
boolean restricted, String owner, Bundle bundle, boolean restricted, String owner, Bundle bundle,
IBiometricDialogReceiver dialogReceiver, IStatusBarService statusBarService) { IBiometricPromptReceiver dialogReceiver, IStatusBarService statusBarService) {
super(context, halDeviceId, token, receiver, targetUserId, groupId, restricted, owner); super(context, halDeviceId, token, receiver, targetUserId, groupId, restricted, owner);
mOpId = opId; mOpId = opId;
mBundle = bundle; mBundle = bundle;
@@ -299,7 +299,7 @@ public abstract class AuthenticationClient extends ClientMonitor {
// If the user already cancelled authentication (via some interaction with the // If the user already cancelled authentication (via some interaction with the
// dialog, we do not need to hide it since it's already hidden. // dialog, we do not need to hide it since it's already hidden.
// If the device is in lockout, don't hide the dialog - it will automatically hide // If the device is in lockout, don't hide the dialog - it will automatically hide
// after BiometricDialog.HIDE_DIALOG_DELAY // after BiometricPrompt.HIDE_DIALOG_DELAY
if (mBundle != null && !mDialogDismissed && !mInLockout) { if (mBundle != null && !mDialogDismissed && !mInLockout) {
try { try {
mStatusBarService.hideFingerprintDialog(); mStatusBarService.hideFingerprintDialog();

View File

@@ -38,7 +38,7 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.pm.UserInfo; import android.content.pm.UserInfo;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint; import android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint;
import android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprintClientCallback; import android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprintClientCallback;
import android.hardware.fingerprint.Fingerprint; import android.hardware.fingerprint.Fingerprint;
@@ -849,7 +849,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
private void startAuthentication(IBinder token, long opId, int callingUserId, int groupId, private void startAuthentication(IBinder token, long opId, int callingUserId, int groupId,
IFingerprintServiceReceiver receiver, int flags, boolean restricted, IFingerprintServiceReceiver receiver, int flags, boolean restricted,
String opPackageName, Bundle bundle, IBiometricDialogReceiver dialogReceiver) { String opPackageName, Bundle bundle, IBiometricPromptReceiver dialogReceiver) {
updateActiveGroup(groupId, opPackageName); updateActiveGroup(groupId, opPackageName);
if (DEBUG) Slog.v(TAG, "startAuthentication(" + opPackageName + ")"); if (DEBUG) Slog.v(TAG, "startAuthentication(" + opPackageName + ")");
@@ -1160,7 +1160,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
public void authenticate(final IBinder token, final long opId, final int groupId, public void authenticate(final IBinder token, final long opId, final int groupId,
final IFingerprintServiceReceiver receiver, final int flags, final IFingerprintServiceReceiver receiver, final int flags,
final String opPackageName, final Bundle bundle, final String opPackageName, final Bundle bundle,
final IBiometricDialogReceiver dialogReceiver) { final IBiometricPromptReceiver dialogReceiver) {
final int callingUid = Binder.getCallingUid(); final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid(); final int callingPid = Binder.getCallingPid();
final int callingUserId = UserHandle.getCallingUserId(); final int callingUserId = UserHandle.getCallingUserId();

View File

@@ -23,7 +23,7 @@ import android.app.StatusBarManager;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.graphics.Rect; import android.graphics.Rect;
import android.hardware.biometrics.IBiometricDialogReceiver; import android.hardware.biometrics.IBiometricPromptReceiver;
import android.os.Binder; import android.os.Binder;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
@@ -547,7 +547,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub {
} }
@Override @Override
public void showFingerprintDialog(Bundle bundle, IBiometricDialogReceiver receiver) { public void showFingerprintDialog(Bundle bundle, IBiometricPromptReceiver receiver) {
if (mBar != null) { if (mBar != null) {
try { try {
mBar.showFingerprintDialog(bundle, receiver); mBar.showFingerprintDialog(bundle, receiver);