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

Commit d3575e0b authored by Steven Moreland's avatar Steven Moreland
Browse files

listByInterface -> listManifestByInterface

This does two things:
- makes sure that HALs configured as lazy HALs will be retrieved
- will detect bad manifest entries earlier

Bug: 131703193
Test: boot
Change-Id: I03503d1963474d9543add75128fa4d7b8c4932ff
parent c0c7806e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

#include <android/hardware/broadcastradio/1.1/IBroadcastRadio.h>
#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
#include <android/hidl/manager/1.2/IServiceManager.h>
#include <broadcastradio-utils-1x/Utils.h>
#include <core_jni_helpers.h>
#include <hidl/ServiceManagement.h>
@@ -123,13 +123,13 @@ static jobject nativeLoadModules(JNIEnv *env, jobject obj, jlong nativeContext)
    auto& ctx = getNativeContext(nativeContext);

    // Get list of registered HIDL HAL implementations.
    auto manager = hardware::defaultServiceManager();
    auto manager = hardware::defaultServiceManager1_2();
    hidl_vec<hidl_string> services;
    if (manager == nullptr) {
        ALOGE("Can't reach service manager, using default service implementation only");
        services = std::vector<hidl_string>({ "default" });
    } else {
        manager->listByInterface(V1_0::IBroadcastRadioFactory::descriptor,
        manager->listManifestByInterface(V1_0::IBroadcastRadioFactory::descriptor,
                [&services](const hidl_vec<hidl_string> &registered) {
            services = registered;
        });