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

Commit 52280c38 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Callback elision for HIDL interfaces.

Test: mma, hidl_test_java
Bug: 31380743
Change-Id: I9a5c8ef0cc6ac3150395a867690ca82ec2bc419f
parent 3c050268
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -325,15 +325,9 @@ static jobject JHwBinder_native_getService(
        return NULL;
    }

    sp<hardware::IBinder> service;
    manager->get(
            ifaceName,
            serviceName,
            [&service](sp<hidl::base::V1_0::IBase> out) {
                service = hardware::toBinder<
                        hidl::base::V1_0::IBase, hidl::base::V1_0::BpBase
                    >(out);
            });
    sp<hidl::base::V1_0::IBase> base = manager->get(ifaceName, serviceName);
    sp<hardware::IBinder> service = hardware::toBinder<
            hidl::base::V1_0::IBase, hidl::base::V1_0::BpBase>(base);

    env->ReleaseStringUTFChars(ifaceNameObj, ifaceName);
    ifaceName = NULL;