Merge "Require permission for hidden APIs in BiometricPrompt" into udc-qpr-dev am: aa49280685 am: 6323441d51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23846751 Change-Id: If44d9949884ede1abcb29439bef6622ca60b1951 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -144,6 +144,7 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
|
||||
private Context mContext;
|
||||
private IAuthService mService;
|
||||
|
||||
// LINT.IfChange
|
||||
/**
|
||||
* Creates a builder for a {@link BiometricPrompt} dialog.
|
||||
* @param context The {@link Context} that will be used to build the prompt.
|
||||
@@ -417,6 +418,7 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
@RequiresPermission(USE_BIOMETRIC_INTERNAL)
|
||||
public Builder setDisallowBiometricsIfPolicyExists(boolean checkDevicePolicyManager) {
|
||||
mPromptInfo.setDisallowBiometricsIfPolicyExists(checkDevicePolicyManager);
|
||||
return this;
|
||||
@@ -429,6 +431,7 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
@RequiresPermission(USE_BIOMETRIC_INTERNAL)
|
||||
public Builder setReceiveSystemEvents(boolean set) {
|
||||
mPromptInfo.setReceiveSystemEvents(set);
|
||||
return this;
|
||||
@@ -442,6 +445,7 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
@RequiresPermission(USE_BIOMETRIC_INTERNAL)
|
||||
public Builder setIgnoreEnrollmentState(boolean ignoreEnrollmentState) {
|
||||
mPromptInfo.setIgnoreEnrollmentState(ignoreEnrollmentState);
|
||||
return this;
|
||||
@@ -454,10 +458,12 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
@RequiresPermission(USE_BIOMETRIC_INTERNAL)
|
||||
public Builder setIsForLegacyFingerprintManager(int sensorId) {
|
||||
mPromptInfo.setIsForLegacyFingerprintManager(sensorId);
|
||||
return this;
|
||||
}
|
||||
// LINT.ThenChange(frameworks/base/core/java/android/hardware/biometrics/PromptInfo.java)
|
||||
|
||||
/**
|
||||
* Creates a {@link BiometricPrompt}.
|
||||
|
||||
@@ -126,6 +126,7 @@ public class PromptInfo implements Parcelable {
|
||||
return false;
|
||||
}
|
||||
|
||||
// LINT.IfChange
|
||||
public boolean containsPrivateApiConfigurations() {
|
||||
if (mDisallowBiometricsIfPolicyExists) {
|
||||
return true;
|
||||
@@ -141,9 +142,14 @@ public class PromptInfo implements Parcelable {
|
||||
return true;
|
||||
} else if (mReceiveSystemEvents) {
|
||||
return true;
|
||||
} else if (mIgnoreEnrollmentState) {
|
||||
return true;
|
||||
} else if (mIsForLegacyFingerprintManager) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// LINT.ThenChange(frameworks/base/core/java/android/hardware/biometrics/BiometricPrompt.java)
|
||||
|
||||
// Setters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user