Loading tests/bar/1.0/default/Bar.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -165,10 +165,8 @@ Return<void> Bar::takeAMask(BitField bf, uint8_t first, const MyMask& second, ui return Void(); } Return<void> Bar::haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) { _hidl_cb(in); return Void(); Return<sp<ISimple>> Bar::haveAInterface(const sp<ISimple> &in) { return in; } Loading tests/bar/1.0/default/Bar.h +1 −2 Original line number Diff line number Diff line Loading @@ -71,8 +71,7 @@ struct Bar : public IBar { Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, takeAMask_cb _hidl_cb) override; Return<void> haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) override; Return<sp<ISimple>> haveAInterface(const sp<ISimple> &in); private: sp<IFoo> mFoo; Loading tests/inheritance/1.0/default/Fetcher.cpp +8 −10 Original line number Diff line number Diff line Loading @@ -17,8 +17,7 @@ Fetcher::Fetcher() { CHECK(!mPrecious->isRemote()); } template <typename CB> Return<void> selectService(bool sendRemote, CB &_hidl_cb, sp<IChild> &local) { sp<IChild> selectService(bool sendRemote, sp<IChild> &local) { sp<IChild> toSend; if (sendRemote) { toSend = IChild::getService("child"); Loading @@ -29,21 +28,20 @@ Return<void> selectService(bool sendRemote, CB &_hidl_cb, sp<IChild> &local) { toSend = local; } LOG(INFO) << "SERVER(Fetcher) selectService returning " << toSend.get(); _hidl_cb(toSend); return Void(); return toSend; } // Methods from ::android::hardware::tests::inheritance::V1_0::IFetcher follow. Return<void> Fetcher::getGrandparent(bool sendRemote, getGrandparent_cb _hidl_cb) { return selectService(sendRemote, _hidl_cb, mPrecious); Return<sp<IGrandparent>> Fetcher::getGrandparent(bool sendRemote) { return selectService(sendRemote, mPrecious); } Return<void> Fetcher::getParent(bool sendRemote, getParent_cb _hidl_cb) { return selectService(sendRemote, _hidl_cb, mPrecious); Return<sp<IParent>> Fetcher::getParent(bool sendRemote) { return selectService(sendRemote, mPrecious); } Return<void> Fetcher::getChild(bool sendRemote, getChild_cb _hidl_cb) { return selectService(sendRemote, _hidl_cb, mPrecious); Return<sp<IChild>> Fetcher::getChild(bool sendRemote) { return selectService(sendRemote, mPrecious); } IFetcher* HIDL_FETCH_IFetcher(const char* /* name */) { Loading tests/inheritance/1.0/default/Fetcher.h +3 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,9 @@ struct Fetcher : public IFetcher { Fetcher(); // Methods from ::android::hardware::tests::inheritance::V1_0::IFetcher follow. Return<void> getGrandparent(bool sendRemote, getGrandparent_cb _hidl_cb) override; Return<void> getParent(bool sendRemote, getParent_cb _hidl_cb) override; Return<void> getChild(bool sendRemote, getChild_cb _hidl_cb) override; Return<sp<IGrandparent>> getGrandparent(bool sendRemote) override; Return<sp<IParent>> getParent(bool sendRemote) override; Return<sp<IChild>> getChild(bool sendRemote) override; private: sp<IChild> mPrecious; Loading Loading
tests/bar/1.0/default/Bar.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -165,10 +165,8 @@ Return<void> Bar::takeAMask(BitField bf, uint8_t first, const MyMask& second, ui return Void(); } Return<void> Bar::haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) { _hidl_cb(in); return Void(); Return<sp<ISimple>> Bar::haveAInterface(const sp<ISimple> &in) { return in; } Loading
tests/bar/1.0/default/Bar.h +1 −2 Original line number Diff line number Diff line Loading @@ -71,8 +71,7 @@ struct Bar : public IBar { Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third, takeAMask_cb _hidl_cb) override; Return<void> haveAInterface(const sp<ISimple> &in, haveAInterface_cb _hidl_cb) override; Return<sp<ISimple>> haveAInterface(const sp<ISimple> &in); private: sp<IFoo> mFoo; Loading
tests/inheritance/1.0/default/Fetcher.cpp +8 −10 Original line number Diff line number Diff line Loading @@ -17,8 +17,7 @@ Fetcher::Fetcher() { CHECK(!mPrecious->isRemote()); } template <typename CB> Return<void> selectService(bool sendRemote, CB &_hidl_cb, sp<IChild> &local) { sp<IChild> selectService(bool sendRemote, sp<IChild> &local) { sp<IChild> toSend; if (sendRemote) { toSend = IChild::getService("child"); Loading @@ -29,21 +28,20 @@ Return<void> selectService(bool sendRemote, CB &_hidl_cb, sp<IChild> &local) { toSend = local; } LOG(INFO) << "SERVER(Fetcher) selectService returning " << toSend.get(); _hidl_cb(toSend); return Void(); return toSend; } // Methods from ::android::hardware::tests::inheritance::V1_0::IFetcher follow. Return<void> Fetcher::getGrandparent(bool sendRemote, getGrandparent_cb _hidl_cb) { return selectService(sendRemote, _hidl_cb, mPrecious); Return<sp<IGrandparent>> Fetcher::getGrandparent(bool sendRemote) { return selectService(sendRemote, mPrecious); } Return<void> Fetcher::getParent(bool sendRemote, getParent_cb _hidl_cb) { return selectService(sendRemote, _hidl_cb, mPrecious); Return<sp<IParent>> Fetcher::getParent(bool sendRemote) { return selectService(sendRemote, mPrecious); } Return<void> Fetcher::getChild(bool sendRemote, getChild_cb _hidl_cb) { return selectService(sendRemote, _hidl_cb, mPrecious); Return<sp<IChild>> Fetcher::getChild(bool sendRemote) { return selectService(sendRemote, mPrecious); } IFetcher* HIDL_FETCH_IFetcher(const char* /* name */) { Loading
tests/inheritance/1.0/default/Fetcher.h +3 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,9 @@ struct Fetcher : public IFetcher { Fetcher(); // Methods from ::android::hardware::tests::inheritance::V1_0::IFetcher follow. Return<void> getGrandparent(bool sendRemote, getGrandparent_cb _hidl_cb) override; Return<void> getParent(bool sendRemote, getParent_cb _hidl_cb) override; Return<void> getChild(bool sendRemote, getChild_cb _hidl_cb) override; Return<sp<IGrandparent>> getGrandparent(bool sendRemote) override; Return<sp<IParent>> getParent(bool sendRemote) override; Return<sp<IChild>> getChild(bool sendRemote) override; private: sp<IChild> mPrecious; Loading