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

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

Merge "Fix fmq_test when HIDL is not supported" into main

parents 648d748e 2089deb2
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -21,13 +21,15 @@
#include <android/binder_manager.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
#include <android/binder_process.h>
#include <android/hardware/tests/msgq/1.0/ITestMsgQ.h>
#include <android/hardware/tests/msgq/1.0/ITestMsgQ.h>
#include <hidl/ServiceManagement.h>


using aidl::android::fmq::test::TestAidlMsgQ;
using aidl::android::fmq::test::TestAidlMsgQ;


#include <hidl/LegacySupport.h>
#include <hidl/LegacySupport.h>


using android::hardware::tests::msgq::V1_0::ITestMsgQ;
using android::hardware::defaultPassthroughServiceImplementation;
using android::hardware::defaultPassthroughServiceImplementation;
using android::hardware::isHidlSupported;
using android::hardware::tests::msgq::V1_0::ITestMsgQ;


int main() {
int main() {
    android::hardware::details::setTrebleTestingOverride(true);
    android::hardware::details::setTrebleTestingOverride(true);
@@ -39,8 +41,10 @@ int main() {
    LOG(INFO) << "instance: " << instance;
    LOG(INFO) << "instance: " << instance;
    CHECK(AServiceManager_addService(store->asBinder().get(), instance.c_str()) == STATUS_OK);
    CHECK(AServiceManager_addService(store->asBinder().get(), instance.c_str()) == STATUS_OK);


    if (isHidlSupported()) {
        // Register HIDL service
        // Register HIDL service
        CHECK(defaultPassthroughServiceImplementation<ITestMsgQ>() == android::OK);
        CHECK(defaultPassthroughServiceImplementation<ITestMsgQ>() == android::OK);
    }
    ABinderProcess_joinThreadPool();
    ABinderProcess_joinThreadPool();


    return EXIT_FAILURE;  // should not reach
    return EXIT_FAILURE;  // should not reach