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

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

Merge "Add enable_private_space_features flag check for Private Space implementation" into main

parents 99efcd49 2b0d2943
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ flag {
    is_fixed_read_only: true
}

# This flag guards the private space feature and all its implementations excluding the APIs. APIs are guarded by android.os.Flags.allow_private_profile.
flag {
    name: "enable_private_space_features"
    namespace: "profile_experiences"
+1 −0
Original line number Diff line number Diff line
@@ -3189,6 +3189,7 @@ public class UserManager {
            conditional = true)
    @UserHandleAware
    public boolean canAddPrivateProfile() {
        if (!android.multiuser.Flags.enablePrivateSpaceFeatures()) return false;
        if (android.multiuser.Flags.blockPrivateSpaceCreation()) {
            try {
                return mService.canAddPrivateProfile(mUserId);
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ flag {
    bug: "288119641"
}

# This flag guards the private space feature, its APIs, and some of the feature implementations. The flag android.multiuser.Flags.enable_private_space_features exclusively guards all the implementations.
flag {
    name: "allow_private_profile"
    namespace: "profile_experiences"
+1 −0
Original line number Diff line number Diff line
@@ -659,6 +659,7 @@ public class IntentForwarderActivity extends Activity {

    private boolean privateSpaceFlagsEnabled() {
        return android.os.Flags.allowPrivateProfile()
                && android.multiuser.Flags.enablePrivateSpaceFeatures()
                && android.multiuser.Flags.enablePrivateSpaceIntentRedirection();
    }

+1 −0
Original line number Diff line number Diff line
@@ -641,6 +641,7 @@ public class IntentForwarderActivityTest {
    public void shouldForwardToParent_telephony_privateProfile() throws Exception {
        mSetFlagsRule.enableFlags(
                android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE,
                android.multiuser.Flags.FLAG_ENABLE_PRIVATE_SPACE_FEATURES,
                android.multiuser.Flags.FLAG_ENABLE_PRIVATE_SPACE_INTENT_REDIRECTION);

        sComponentName = FORWARD_TO_PARENT_COMPONENT_NAME;
Loading