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

Commit 42606930 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "Check result of registerAsService in dumpstate." into oc-dev

am: 5221194a

Change-Id: I83beb7c1a92135a441b4453931d70d4f5c9deec5
parents d72f9aed 5221194a
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -24,11 +24,18 @@ using ::android::hardware::configureRpcThreadpool;
using ::android::hardware::dumpstate::V1_0::IDumpstateDevice;
using ::android::hardware::dumpstate::V1_0::implementation::DumpstateDevice;
using ::android::hardware::joinRpcThreadpool;
using ::android::OK;
using ::android::sp;

int main(int /* argc */, char* /* argv */ []) {
    sp<IDumpstateDevice> dumpstate = new DumpstateDevice;
    configureRpcThreadpool(1, true);
    dumpstate->registerAsService();
    configureRpcThreadpool(1, true /* will join */);
    if (dumpstate->registerAsService() != OK) {
        ALOGE("Could not register service.");
        return 1;
    }
    joinRpcThreadpool();

    ALOGE("Service exited!");
    return 1;
}