Merge "Redirect to the right combined biometrics in work profile." into udc-dev am: 37dad2b3d4

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22576586

Change-Id: I042d19b86f10a6741380b2dc458d87d68218cf16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Elliot Sisteron
2023-04-13 08:27:44 +00:00
committed by Automerger Merge Worker
2 changed files with 14 additions and 1 deletions

View File

@@ -132,6 +132,19 @@ public class CombinedBiometricStatusUtils {
return mFaceManager != null && mFaceManager.hasEnrolledTemplates(mUserId);
}
/**
* 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.
*/

View File

@@ -85,7 +85,7 @@ public final class BiometricsSafetySource {
combinedBiometricStatusUtils.getSummary(),
createPendingIntent(context,
biometricNavigationUtils.getBiometricSettingsIntent(context,
combinedBiometricStatusUtils.getSettingsClassName(),
combinedBiometricStatusUtils.getSettingsClassNameBasedOnUser(),
disablingAdmin, Bundle.EMPTY),
REQUEST_CODE_COMBINED_BIOMETRIC_SETTING),
disablingAdmin == null /* enabled */,