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

Commit f0374167 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

VTS: enforce AIDL for media.c2

Bug: 325678782
Test: atest VtsHalMediaC2V1_0TargetMasterTest
Change-Id: Id2c0c90ae23e1a959b262ad4525d3ec70f265bec
parent d971c58c
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define LOG_TAG "codec2_hidl_hal_master_test"

#include <android-base/logging.h>
#include <android-base/properties.h>
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
@@ -82,6 +83,20 @@ TEST_P(Codec2MasterHalTest, ListComponents) {
    }
}

TEST_P(Codec2MasterHalTest, MustUseAidlBeyond202404) {
    static int sBoardFirstApiLevel = android::base::GetIntProperty("ro.board.first_api_level", 0);
    static int sBoardApiLevel = android::base::GetIntProperty("ro.board.api_level", 0);
    if (sBoardFirstApiLevel < 202404 && sBoardApiLevel < 202404) {
        GTEST_SKIP() << "board first level less than 202404:"
                     << " ro.board.first_api_level = " << sBoardFirstApiLevel
                     << " ro.board.api_level = " << sBoardApiLevel;
    }
    ALOGV("HidlCodecAllowed Test");

    EXPECT_NE(mClient->getAidlBase(), nullptr) << "android.hardware.media.c2 MUST use AIDL "
                                               << "for chipsets launching at 202404 or above";
}

}  // anonymous namespace

INSTANTIATE_TEST_SUITE_P(PerInstance, Codec2MasterHalTest,