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

Commit 45ad354f authored by Rupert Lane's avatar Rupert Lane
Browse files

Rename Build.IS_CONTAINER to IS_ARC

As ARC is moving from a container to a VM based solution, change the
build method to detect this.

Bug: 139490365
Test: Check that VM works after pushing to device: run play store,
install app.

Change-Id: Ic91a7e5c9a36242d2c905cecffeec72acba8ff45
(cherry picked from commit 2f78de6d0e1428d959f97ea0dd0e3c9c28b6e3fb)
parent 2791003f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1281,7 +1281,11 @@ public class Build {
    public static final boolean IS_USER = "user".equals(TYPE);

    /**
     * Whether this build is running inside a container.
     * Whether this build is running on ARC, the Android Runtime for Chrome
     * (https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md).
     * Prior to R this was implemented as a container but from R this will be
     * a VM. The name of the property remains ro.boot.conntainer as it is
     * referenced in other projects.
     *
     * We should try to avoid checking this flag if possible to minimize
     * unnecessarily diverging from non-container Android behavior.
@@ -1292,7 +1296,7 @@ public class Build {
     * For higher-level behavior differences, other checks should be preferred.
     * @hide
     */
    public static final boolean IS_CONTAINER =
    public static final boolean IS_ARC =
            SystemProperties.getBoolean("ro.boot.container", false);

    /**
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ public class StorageStatsService extends IStorageStatsManager.Stub {
    public boolean isReservedSupported(String volumeUuid, String callingPackage) {
        if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) {
            return SystemProperties.getBoolean(StorageManager.PROP_HAS_RESERVED, false)
                    || Build.IS_CONTAINER;
                    || Build.IS_ARC;
        } else {
            return false;
        }