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

Commit 5cfdd429 authored by Devin Moore's avatar Devin Moore
Browse files

Use the real component store for AIDL C2

Test: atest com.android.devicehealthchecks.MediaBootCheck
Bug: 331275333
Change-Id: Idf7b79aabf645fa0cacdc44e0c28ad47638718e8
parent b215e169
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -837,9 +837,13 @@ extern "C" void RegisterCodecServices() {
        std::string(c2_aidl::IComponentStore::descriptor) + "/software";
    if (__builtin_available(android __ANDROID_API_S__, *)) {
        if (AServiceManager_isDeclared(aidlServiceName.c_str())) {
            std::shared_ptr<c2_aidl::IComponentStore> aidlStore =
                    ::ndk::SharedRefBase::make<c2_aidl::utils::ComponentStore>(
            std::shared_ptr<c2_aidl::IComponentStore> aidlStore;
            if (aidlSelected) {
                aidlStore = ::ndk::SharedRefBase::make<c2_aidl::utils::ComponentStore>(store);
            } else {
                aidlStore = ::ndk::SharedRefBase::make<c2_aidl::utils::ComponentStore>(
                        std::make_shared<H2C2ComponentStore>(nullptr));
            }
            binder_exception_t ex = AServiceManager_addService(
                    aidlStore->asBinder().get(), aidlServiceName.c_str());
            if (ex == EX_NONE) {