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

Commit 67b3ce68 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Skip VtsAidlHalDrmTargetTest if bootloader is unlocked" into main am:...

Merge "Skip VtsAidlHalDrmTargetTest if bootloader is unlocked" into main am: 70bc48df am: 578f1462

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3349379



Change-Id: Ic5ff467fedf5dede113f6475594882e02ea15510
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5dd455a5 578f1462
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <android/binder_process.h>
#include <android/sharedmem.h>
#include <cutils/native_handle.h>
#include <cutils/properties.h>

#include "drm_hal_clearkey_module.h"
#include "drm_hal_common.h"
@@ -193,6 +194,13 @@ void DrmHalTest::SetUp() {
        GTEST_SKIP() << "No vendor module installed";
    }

    char bootloader_state[PROPERTY_VALUE_MAX] = {};
    if (property_get("ro.boot.vbmeta.device_state", bootloader_state, "") != 0) {
        if (!strcmp(bootloader_state, "unlocked")) {
            GTEST_SKIP() << "Skip test because bootloader is unlocked";
        }
    }

    if (drmInstance.find("IDrmFactory") != std::string::npos) {
        drmFactory = IDrmFactory::fromBinder(
                ::ndk::SpAIBinder(AServiceManager_waitForService(drmInstance.c_str())));