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

Commit 387c65f6 authored by Xiaohui Chen's avatar Xiaohui Chen
Browse files

Add build flag for container builds

Test: lunch and build
Bug: 34350397
Change-Id: Ideb14200b5056449055ca17d868c615548445dc9
parent 0608a3bf
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -886,6 +886,21 @@ public class Build {
    public static final boolean IS_ENG =
            "eng".equals(getString("ro.build.type"));

    /**
     * Whether this build is running inside a container.
     *
     * We should try to avoid checking this flag if possible to minimize
     * unnecessarily diverging from non-container Android behavior.
     * Checking this flag is acceptable when low-level resources being
     * different, e.g. the availability of certain capabilities, access to
     * system resources being restricted, and the fact that the host OS might
     * handle some features for us.
     * For higher-level behavior differences, other checks should be preferred.
     * @hide
     */
    public static final boolean IS_CONTAINER =
            SystemProperties.getBoolean("ro.boot.container", false);

    /**
     * Specifies whether the permissions needed by a legacy app should be
     * reviewed before any of its components can run. A legacy app is one