OSDN Git Service

hidl_test: do not use Return for app errors.
authorYifan Hong <elsk@google.com>
Wed, 2 Nov 2016 23:50:01 +0000 (16:50 -0700)
committerYifan Hong <elsk@google.com>
Thu, 3 Nov 2016 00:47:46 +0000 (17:47 -0700)
Test: hidl_test
Bug: 31348667
Change-Id: Icc7e926bbb886b040fdea0ff9dee8bedad0860e7

tests/inheritance/1.0/default/Fetcher.cpp

index 28dffaa..74f8d07 100644 (file)
@@ -23,7 +23,7 @@ Return<void> selectService(bool sendRemote, CB &_hidl_cb, sp<IChild> &local) {
     if (sendRemote) {
         toSend = IChild::getService("child");
         if (!toSend->isRemote()) {
-            return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE);
+            toSend = nullptr;
         }
     } else {
         toSend = local;