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

Commit 47ad23e2 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Rename enable_pip2_implementation to enable_pip2

This is to migrate the pip2 read-only flag to a read-write one. We
renamed the flag to avoid causing confusion to the system.

The pip2 flag is not used early in the boot process, it's safe for us to
do this convert.

Updated also the tracking bug in aconfig

Flag: com.android.wm.shell.enable_pip2
Bug: 362824417
Bug: 311462191
Test: Flip the flag in Flag Flipper app
Change-Id: I19e93cc8f463d93bf1ebe2f7d63b77d46832ce00
parent a8c0f9f0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -25,11 +25,10 @@ flag {
}

flag {
    name: "enable_pip2_implementation"
    name: "enable_pip2"
    namespace: "multitasking"
    description: "Enables the new implementation of PiP (PiP2)"
    bug: "290220798"
    is_fixed_read_only: true
    bug: "311462191"
}

flag {
+1 −4
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.content.Context
import android.content.pm.PackageManager
import android.graphics.Rect
import android.os.RemoteException
import android.os.SystemProperties
import android.util.DisplayMetrics
import android.util.Log
import android.util.Pair
@@ -178,9 +177,7 @@ object PipUtils {
                "org.chromium.arc", 0)
            val isTv = AppGlobals.getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_LEANBACK, 0)
            isPip2ExperimentEnabled = SystemProperties.getBoolean(
                    "persist.wm_shell.pip2", false) ||
                    (Flags.enablePip2Implementation() && !isArc && !isTv)
            isPip2ExperimentEnabled = Flags.enablePip2() && !isArc && !isTv
        }
        return isPip2ExperimentEnabled as Boolean
    }
+1 −3
Original line number Diff line number Diff line
@@ -7474,9 +7474,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                    FEATURE_LEANBACK);
            final boolean isArc = arcFeature != null && arcFeature.version >= 0;
            final boolean isTv = tvFeature != null && tvFeature.version >= 0;
            sIsPip2ExperimentEnabled = SystemProperties.getBoolean(
                    "persist.wm_shell.pip2", false)
                    || (Flags.enablePip2Implementation() && !isArc && !isTv);
            sIsPip2ExperimentEnabled = Flags.enablePip2() && !isArc && !isTv;
        }
        return sIsPip2ExperimentEnabled;
    }