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

Commit 1d4ebb0b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Check userspace snapshots only for API level >= T" am: ff3fdf36 am: 0cbf9cee

parents f0515357 0cbf9cee
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -17,7 +17,14 @@
#include <android-base/properties.h>
#include <gtest/gtest.h>

static int GetVsrLevel() {
    return android::base::GetIntProperty("ro.vendor.api_level", -1);
}

TEST(VAB, Enabled) {
    ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.enabled", false));
    if (GetVsrLevel() < __ANDROID_API_T__) {
        GTEST_SKIP();
    }
    ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.userspace.snapshots.enabled", false));
}