diff options
author | Martijn Coenen <maco@google.com> | 2016-12-15 21:34:38 +0100 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2016-12-15 21:34:38 +0100 |
commit | 0dbb9903cd8b414ca16f6b4bb379bfcadecea0a5 (patch) | |
tree | 823f312a9987d049b2c854637db1c56e69e91ab7 /tests/bar | |
parent | 441f2fda32d597aa369df299c4da1bfb5e5f7152 (diff) | |
download | platform_hardware_interfaces-0dbb9903cd8b414ca16f6b4bb379bfcadecea0a5.tar.gz platform_hardware_interfaces-0dbb9903cd8b414ca16f6b4bb379bfcadecea0a5.tar.bz2 platform_hardware_interfaces-0dbb9903cd8b414ca16f6b4bb379bfcadecea0a5.zip |
Revert "Fix tests for using IBase instead of IBinder."
This reverts commit 1d747311b3aa3d208aedf3dfce97d134d57db723.
Bug: 33173166
Test: builds, hidl_test
Diffstat (limited to 'tests/bar')
-rw-r--r-- | tests/bar/1.0/default/Bar.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/tests/bar/1.0/default/Bar.cpp b/tests/bar/1.0/default/Bar.cpp index a9b6c25ff8..a750fe41e6 100644 --- a/tests/bar/1.0/default/Bar.cpp +++ b/tests/bar/1.0/default/Bar.cpp @@ -122,36 +122,10 @@ Return<void> Bar::haveAVectorOfInterfaces( return Void(); } -// TODO: remove after b/33173166 is fixed. -struct Simple : public ISimple { - Simple(int32_t cookie) - : mCookie(cookie) { - } - - Return<int32_t> getCookie() override { - return mCookie; - } - -private: - int32_t mCookie; -}; - -// TODO: use _hidl_cb(in) after b/33173166 is fixed. Return<void> Bar::haveAVectorOfGenericInterfaces( const hidl_vec<sp<android::hidl::base::V1_0::IBase> > &in, haveAVectorOfGenericInterfaces_cb _hidl_cb) { - // _hidl_cb(in); - hidl_vec<sp<android::hidl::base::V1_0::IBase> > out; - out.resize(in.size()); - for (size_t i = 0; i < in.size(); ++i) { - sp<ISimple> s = ISimple::castFrom(in[i]); - if (s.get() == nullptr) { - out[i] = new Simple(-1); - } else { - out[i] = new Simple(s->getCookie()); - } - } - _hidl_cb(out); + _hidl_cb(in); return Void(); } |