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

Commit 4c6e3301 authored by Devin Moore's avatar Devin Moore Committed by Gerrit Code Review
Browse files

Merge "Stop serving HIDL media.c2 software instance in 202404 devices" into main

parents 8309b620 2bdc1e9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
<manifest version="1.0" type="framework">
    <hal>
    <hal format="hidl" max-level="8">
        <name>android.hardware.media.c2</name>
        <transport>hwbinder</transport>
        <version>1.2</version>
+20 −8
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <C2Component.h>
#include <C2PlatformSupport.h>

#include <android/hidl/manager/1.2/IServiceManager.h>
#include <codec2/hidl/1.0/ComponentStore.h>
#include <codec2/hidl/1.1/ComponentStore.h>
#include <codec2/hidl/1.2/ComponentStore.h>
@@ -834,6 +835,13 @@ extern "C" void RegisterCodecServices() {
        }
    }

    // If the software component store isn't declared in the manifest, we don't
    // need to create the service and register it.
    using ::android::hidl::manager::V1_2::IServiceManager;
    IServiceManager::Transport transport =
            android::hardware::defaultServiceManager1_2()->getTransport(
                    V1_2::utils::ComponentStore::descriptor, "software");
    if (transport == IServiceManager::Transport::HWBINDER) {
        if (!hidlStore) {
            hidlStore = ::android::sp<V1_2::utils::ComponentStore>::make(
                    std::make_shared<H2C2ComponentStore>(nullptr));
@@ -844,6 +852,10 @@ extern "C" void RegisterCodecServices() {
        } else {
            LOG(ERROR) << "Cannot register software Codec2 v" << hidlVer << " service.";
        }
    } else {
        LOG(INFO) << "The HIDL software Codec2 service is deprecated"
                     " so it is not being registered with hwservicemanager.";
    }

    if (registered) {
        LOG(INFO) << "Software Codec2 service created and registered.";