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

Commit 33fd31e9 authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan Committed by Android (Google) Code Review
Browse files

Merge "USB: HIDL: check the status of registerAsService" into oc-dev

parents 75e2bf04 88a4d874
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -27,13 +27,21 @@ using android::hardware::joinRpcThreadpool;
using android::hardware::usb::V1_0::IUsb;
using android::hardware::usb::V1_0::implementation::Usb;

using android::status_t;
using android::OK;

int main() {

    android::sp<IUsb> service = new Usb();

    configureRpcThreadpool(1, true /*callerWillJoin*/);
    service->registerAsService();
    status_t status = service->registerAsService();

    if (status == OK) {
        ALOGI("USB HAL Ready.");
        joinRpcThreadpool();
    }

    ALOGE("Cannot register USB HAL service");
    return 1;
}