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

Commit 60e4a5ba authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "codecserviceregistrant: don't attempt to register AIDL service pre-V" into main

parents 21261409 60f836dc
Loading
Loading
Loading
Loading
+19 −11
Original line number Diff line number Diff line
@@ -737,6 +737,12 @@ extern "C" void RegisterCodecServices() {
    using namespace ::android::hardware::media::c2;

    int platformVersion = android_get_device_api_level();
    // STOPSHIP: Remove code name checking once platform version bumps up to 35.
    std::string codeName =
        android::base::GetProperty("ro.build.version.codename", "");
    if (codeName == "VanillaIceCream") {
        platformVersion = __ANDROID_API_V__;
    }

    android::sp<V1_0::IComponentStore> hidlStore;
    std::shared_ptr<c2_aidl::IComponentStore> aidlStore;
@@ -797,6 +803,7 @@ extern "C" void RegisterCodecServices() {
        }
    }

    if (platformVersion >= __ANDROID_API_V__) {
        if (!aidlStore) {
            aidlStore = ::ndk::SharedRefBase::make<c2_aidl::utils::ComponentStore>(
                    std::make_shared<H2C2ComponentStore>(nullptr));
@@ -809,6 +816,7 @@ extern "C" void RegisterCodecServices() {
            LOG(ERROR) << "Cannot register software Codec2 AIDL service.";
            return;
        }
    }

    if (!hidlStore) {
        hidlStore = ::android::sp<V1_0::utils::ComponentStore>::make(