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

This commit is contained in:
TreeHugger Robot 2017-03-31 01:05:31 +00:00 committed by Android (Google) Code Review
commit 5221194a30

View file

@ -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 */ []) {
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;
}