Update the biometric unlock logo to Private Space logo

All activities that use biometric login through the CDCA class show a
Settings icon in the prompt. This cl adds a capability for the client of
the CDCA to set icon and icon description as extras to the unlock
intent.

Screenshot: http://shortn/_OpKTYFtddM

Bug: 333528540
Test: Manually verified on the device

Change-Id: Id7b5a3fe575069bef1810769e4f437e717d2d3c6
This commit is contained in:
Olivier Nshimiye
2024-04-17 12:05:36 +00:00
parent 7030928506
commit 14d4b41363
3 changed files with 50 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ import android.hardware.biometrics.PromptInfo;
import android.multiuser.Flags;
import android.os.Bundle;
import android.os.CancellationSignal;
import android.text.TextUtils;
import androidx.annotation.NonNull;
@@ -149,6 +150,13 @@ public class BiometricFragment extends InstrumentedFragment {
.setShowEmergencyCallButton(promptInfo.isShowEmergencyCallButton())
.setReceiveSystemEvents(true)
.setComponentNameForConfirmDeviceCredentialActivity(callingActivity);
if (promptInfo.getLogoRes() != 0){
promptBuilder.setLogoRes(promptInfo.getLogoRes());
}
String logoDescription = promptInfo.getLogoDescription();
if (!TextUtils.isEmpty(logoDescription)) {
promptBuilder.setLogoDescription(logoDescription);
}
if (android.os.Flags.allowPrivateProfile() && Flags.enablePrivateSpaceFeatures()
&& Flags.enableBiometricsToUnlockPrivateSpace()) {