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

Commit ef9e6d23 authored by Olivier Nshimiye's avatar Olivier Nshimiye
Browse files

Add flag guard to isPrivateProfile() API

Bug: 303726780
Change-Id: I3023c440e398d99676b4e9388afd4294b29a083e
parent b7c89a1b
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);
    }