Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcfa9255 authored by Olivier Nshimiye's avatar Olivier Nshimiye Committed by Android (Google) Code Review
Browse files

Merge "Set custom logo and logo description for Private space biometric login" into main

parents af4a0fe6 5272e8a3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -267,3 +267,13 @@ flag {
      purpose: PURPOSE_BUGFIX
    }
}

flag {
  name: "use_private_space_icon_in_biometric_prompt"
  namespace: "profile_experiences"
  description: "Update the biometric prompt from generic Settings icon to private space icon"
  bug: "333528540"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+3 −0
Original line number Diff line number Diff line
@@ -6473,6 +6473,9 @@ ul.</string>
    <!-- Accessibility label for clone profile user type [CHAR LIMIT=30] -->
    <string name="accessibility_label_communal_profile">Communal</string>

    <!-- Label for private space biometric prompt logo description [CHAR LIMIT=30] -->
    <string name="private_space_biometric_prompt_title">Private space</string>

    <!-- Notification message used when a notification's normal message contains sensitive information [CHAR_LIMIT=NOTIF_BODY] -->
    <string name="redacted_notification_message">Sensitive notification content hidden</string>
    <!-- Notification action title used instead of a notification's normal title sensitive [CHAR_LIMIT=NOTIF_BODY] -->
+1 −0
Original line number Diff line number Diff line
@@ -1116,6 +1116,7 @@
  <java-symbol type="string" name="accessibility_label_private_profile" />
  <java-symbol type="string" name="accessibility_label_clone_profile" />
  <java-symbol type="string" name="accessibility_label_communal_profile" />
  <java-symbol type="string" name="private_space_biometric_prompt_title" />
  <java-symbol type="string" name="mediasize_unknown_portrait" />
  <java-symbol type="string" name="mediasize_unknown_landscape" />
  <java-symbol type="string" name="mediasize_iso_a0" />
+12 −0
Original line number Diff line number Diff line
@@ -281,6 +281,10 @@ public class UserManagerService extends IUserManager.Stub {
    private static final String RESTRICTIONS_FILE_PREFIX = "res_";
    private static final String XML_SUFFIX = ".xml";

    private static final String CUSTOM_BIOMETRIC_PROMPT_LOGO_RES_ID_KEY = "custom_logo_res_id";
    private static final String CUSTOM_BIOMETRIC_PROMPT_LOGO_DESCRIPTION_KEY =
            "custom_logo_description";

    private static final int ALLOWED_FLAGS_FOR_CREATE_USERS_PERMISSION =
            UserInfo.FLAG_MANAGED_PROFILE
            | UserInfo.FLAG_PROFILE
@@ -1970,6 +1974,14 @@ public class UserManagerService extends IUserManager.Stub {
        // intentSender
        unlockIntent.putExtra(Intent.EXTRA_INTENT, pendingIntent.getIntentSender());
        unlockIntent.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

        if (Flags.enablePrivateSpaceFeatures() && Flags.usePrivateSpaceIconInBiometricPrompt()
                && getUserInfo(userId).isPrivateProfile()) {
            unlockIntent.putExtra(CUSTOM_BIOMETRIC_PROMPT_LOGO_RES_ID_KEY,
                    com.android.internal.R.drawable.stat_sys_private_profile_status);
            unlockIntent.putExtra(CUSTOM_BIOMETRIC_PROMPT_LOGO_DESCRIPTION_KEY,
                    mContext.getString(R.string.private_space_biometric_prompt_title));
        }
        mContext.startActivityAsUser(
                unlockIntent, UserHandle.of(getProfileParentIdUnchecked(userId)));
    }