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

Commit 66c0d06e authored by Joseph Vincent's avatar Joseph Vincent Committed by Android (Google) Code Review
Browse files

Merge "Make isPrivateProfile() API a systemAPI" into main

parents c0253a15 2537f5e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10514,6 +10514,7 @@ package android.os {
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.QUERY_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean isManagedProfile(int);
    method @Deprecated public boolean isMediaSharedWithParent();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS, android.Manifest.permission.QUERY_USERS}) public boolean isPrimaryUser();
    method @FlaggedApi("android.os.allow_private_profile") public boolean isPrivateProfile();
    method public static boolean isRemoveResultSuccessful(int);
    method public boolean isRestrictedProfile();
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS, android.Manifest.permission.QUERY_USERS}, conditional=true) public boolean isRestrictedProfile(@NonNull android.os.UserHandle);
+1 −0
Original line number Diff line number Diff line
@@ -2375,6 +2375,7 @@ package android.os {
    method public boolean isVisibleBackgroundUsersOnDefaultDisplaySupported();
    method public boolean isVisibleBackgroundUsersSupported();
    method @Deprecated @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public android.content.pm.UserInfo preCreateUser(@NonNull String) throws android.os.UserManager.UserOperationException;
    field @FlaggedApi("android.os.allow_private_profile") public static final String USER_TYPE_PROFILE_PRIVATE = "android.os.usertype.profile.PRIVATE";
  }

  public final class VibrationAttributes implements android.os.Parcelable {
+9 −3
Original line number Diff line number Diff line
@@ -153,8 +153,8 @@ public class UserManager {

    /**
     * User type representing a clone profile. Clone profile is a user profile type used to run
     * second instance of an otherwise single user App (eg, messengers). Only the primary user
     * is allowed to have a clone profile.
     * second instance of an otherwise single user App (eg, messengers). Currently only the
     * {@link android.content.pm.UserInfo#isMain()} user can have a clone profile.
     *
     * @hide
     */
@@ -166,6 +166,8 @@ public class UserManager {
     * User type representing a private profile.
     * @hide
     */
    @FlaggedApi(android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE)
    @TestApi
    public static final String USER_TYPE_PROFILE_PRIVATE = "android.os.usertype.profile.PRIVATE";

    /**
@@ -3261,11 +3263,15 @@ public class UserManager {
    /**
     * Checks if the context user is a private profile.
     *
     * <p>A Private profile is a separate {@link #isProfile() profile} that can be used to store
     * sensitive apps and data, which can be hidden or revealed at the user's discretion.
     *
     * @return whether the context user is a private profile.
     *
     * @see android.os.UserManager#USER_TYPE_PROFILE_PRIVATE
     * @hide
     */
    @SystemApi
    @FlaggedApi(android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE)
    @UserHandleAware(
            requiresAnyOfPermissionsIfNotCallerProfileGroup = {
                    android.Manifest.permission.MANAGE_USERS,