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

Commit 58aca169 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes Ie5e47d84,I3c5c9917,Ife48b163 am: 9f2c6248 am: 2d046219

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1838534

Change-Id: Ifdeb5416a38d8a9dafa7ae648dedb98342a75c52
parents cd952c36 2d046219
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -82,11 +82,6 @@ static bool IsApexUpdatable() {
    return updatable;
}

static bool IsMicrodroid() {
    static bool is_microdroid = android::base::GetProperty("ro.hardware", "") == "microdroid";
    return is_microdroid;
}

// In case we have two sets of APEXes (non-updatable, updatable), we need two separate mount
// namespaces.
static bool NeedsTwoMountNamespaces() {
+6 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
#endif

using android::base::GetExecutablePath;
using android::base::GetProperty;
using android::base::Join;
using android::base::Socketpair;
using android::base::Split;
@@ -337,6 +338,11 @@ Result<std::vector<std::string>> Subcontext::ExpandArgs(const std::vector<std::s
}

void InitializeSubcontext() {
    if (IsMicrodroid()) {
        LOG(INFO) << "Not using subcontext for microdroid";
        return;
    }

    if (SelinuxGetVendorAndroidVersion() >= __ANDROID_API_P__) {
        subcontext.reset(
                new Subcontext(std::vector<std::string>{"/vendor", "/odm"}, kVendorContext));
+5 −0
Original line number Diff line number Diff line
@@ -757,5 +757,10 @@ void SetDefaultMountNamespaceReady() {
    is_default_mount_namespace_ready = true;
}

bool IsMicrodroid() {
    static bool is_microdroid = android::base::GetProperty("ro.hardware", "") == "microdroid";
    return is_microdroid;
}

}  // namespace init
}  // namespace android
+2 −0
Original line number Diff line number Diff line
@@ -103,5 +103,7 @@ bool IsRecoveryMode();

bool IsDefaultMountNamespaceReady();
void SetDefaultMountNamespaceReady();

bool IsMicrodroid();
}  // namespace init
}  // namespace android