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

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

Merge "Add flag guard to isPrivateProfile() API" into main

parents 386085b0 ef9e6d23
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1085,7 +1085,7 @@ package android.content.pm {
    method public boolean isMain();
    method public boolean isManagedProfile();
    method @Deprecated public boolean isPrimary();
    method public boolean isPrivateProfile();
    method @FlaggedApi("android.os.allow_private_profile") public boolean isPrivateProfile();
    method public boolean isProfile();
    method public boolean isQuietModeEnabled();
    method public boolean isRestricted();
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package android.content.pm;

import static android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -390,6 +393,7 @@ public class UserInfo implements Parcelable {
        return UserManager.isUserTypeCommunalProfile(userType);
    }

    @FlaggedApi(FLAG_ALLOW_PRIVATE_PROFILE)
    public boolean isPrivateProfile() {
        return UserManager.isUserTypePrivateProfile(userType);
    }