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

Commit 26dceea3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "VTS: enforce AIDL for media.c2" into main am: 177886c9

parents fcbe18ae 177886c9
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,