Merge "Redirect to the right combined biometrics in work profile." into udc-dev
diff --git a/src/com/android/settings/biometrics/combination/CombinedBiometricStatusUtils.java b/src/com/android/settings/biometrics/combination/CombinedBiometricStatusUtils.java
index d3e8fa7..8cc6bc4 100644
--- a/src/com/android/settings/biometrics/combination/CombinedBiometricStatusUtils.java
+++ b/src/com/android/settings/biometrics/combination/CombinedBiometricStatusUtils.java
@@ -133,6 +133,19 @@
}
/**
+ * Returns the class name of the Settings page corresponding to combined biometric settings
+ * based on the current user.
+ */
+ public String getSettingsClassNameBasedOnUser() {
+ UserManager userManager = mContext.getSystemService(UserManager.class);
+ if (userManager != null && userManager.isProfile()) {
+ return getProfileSettingsClassName();
+ } else {
+ return getSettingsClassName();
+ }
+ }
+
+ /**
* Returns the class name of the Settings page corresponding to combined biometric settings.
*/
public String getSettingsClassName() {
diff --git a/src/com/android/settings/safetycenter/BiometricsSafetySource.java b/src/com/android/settings/safetycenter/BiometricsSafetySource.java
index 1fe366d..74964ce 100644
--- a/src/com/android/settings/safetycenter/BiometricsSafetySource.java
+++ b/src/com/android/settings/safetycenter/BiometricsSafetySource.java
@@ -85,7 +85,7 @@
combinedBiometricStatusUtils.getSummary(),
createPendingIntent(context,
biometricNavigationUtils.getBiometricSettingsIntent(context,
- combinedBiometricStatusUtils.getSettingsClassName(),
+ combinedBiometricStatusUtils.getSettingsClassNameBasedOnUser(),
disablingAdmin, Bundle.EMPTY),
REQUEST_CODE_COMBINED_BIOMETRIC_SETTING),
disablingAdmin == null /* enabled */,