diff options
author | Steven Moreland <smoreland@google.com> | 2020-10-02 16:32:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-10-02 16:32:25 +0000 |
commit | 730aef9a78f3b84b6a364228897a6fbb709fd07d (patch) | |
tree | 4c3e7348568458f01dec2c2b179f5f0a2d3e2b3b /tests | |
parent | 46e2487ac07c296e6e10cfb1e51f0c291130af12 (diff) | |
parent | c0236f06e74f44e0b23ed41e7706ce60d5dde12c (diff) |
Merge "hidl_test_java interfaces: use generic interfaces"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/baz/1.0/IBaz.hal | 2 | ||||
-rw-r--r-- | tests/safeunion/1.0/Android.bp | 1 | ||||
-rw-r--r-- | tests/safeunion/1.0/IOtherInterface.hal | 21 | ||||
-rw-r--r-- | tests/safeunion/1.0/ISafeUnion.hal | 6 | ||||
-rw-r--r-- | tests/safeunion/1.0/default/SafeUnion.cpp | 4 | ||||
-rw-r--r-- | tests/safeunion/1.0/default/SafeUnion.h | 4 |
6 files changed, 9 insertions, 29 deletions
diff --git a/tests/baz/1.0/IBaz.hal b/tests/baz/1.0/IBaz.hal index 7855446aca..8be1d619c6 100644 --- a/tests/baz/1.0/IBaz.hal +++ b/tests/baz/1.0/IBaz.hal @@ -94,7 +94,7 @@ interface IBaz extends IBase { int8_t[7] array; string oneString; vec<string> vectorOfStrings; - IBase dummy; + interface iface; }; oneway doThis(float param); diff --git a/tests/safeunion/1.0/Android.bp b/tests/safeunion/1.0/Android.bp index 293783280f..f1ec267768 100644 --- a/tests/safeunion/1.0/Android.bp +++ b/tests/safeunion/1.0/Android.bp @@ -4,7 +4,6 @@ hidl_interface { name: "android.hardware.tests.safeunion@1.0", root: "android.hardware", srcs: [ - "IOtherInterface.hal", "ISafeUnion.hal", ], interfaces: [ diff --git a/tests/safeunion/1.0/IOtherInterface.hal b/tests/safeunion/1.0/IOtherInterface.hal deleted file mode 100644 index cdaf84799a..0000000000 --- a/tests/safeunion/1.0/IOtherInterface.hal +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.hardware.tests.safeunion@1.0; - -interface IOtherInterface { - concatTwoStrings(string a, string b) generates (string result); -}; diff --git a/tests/safeunion/1.0/ISafeUnion.hal b/tests/safeunion/1.0/ISafeUnion.hal index 58c08c6153..01e1727679 100644 --- a/tests/safeunion/1.0/ISafeUnion.hal +++ b/tests/safeunion/1.0/ISafeUnion.hal @@ -16,8 +16,6 @@ package android.hardware.tests.safeunion@1.0; -import IOtherInterface; - import android.hidl.safe_union@1.0::Monostate; interface ISafeUnion { @@ -73,7 +71,7 @@ interface ISafeUnion { uint32_t a; int8_t[7] b; - IOtherInterface c; + interface c; string d; vec<string> e; handle f; @@ -107,7 +105,7 @@ interface ISafeUnion { newInterfaceTypeSafeUnion() generates (InterfaceTypeSafeUnion myUnion); setInterfaceA(InterfaceTypeSafeUnion myUnion, uint32_t a) generates (InterfaceTypeSafeUnion myUnion); setInterfaceB(InterfaceTypeSafeUnion myUnion, int8_t[7] b) generates (InterfaceTypeSafeUnion myUnion); - setInterfaceC(InterfaceTypeSafeUnion myUnion, IOtherInterface c) generates (InterfaceTypeSafeUnion myUnion); + setInterfaceC(InterfaceTypeSafeUnion myUnion, interface c) generates (InterfaceTypeSafeUnion myUnion); setInterfaceD(InterfaceTypeSafeUnion myUnion, string d) generates (InterfaceTypeSafeUnion myUnion); setInterfaceE(InterfaceTypeSafeUnion myUnion, vec<string> e) generates (InterfaceTypeSafeUnion myUnion); setInterfaceF(InterfaceTypeSafeUnion myUnion, handle f) generates (InterfaceTypeSafeUnion myUnion); diff --git a/tests/safeunion/1.0/default/SafeUnion.cpp b/tests/safeunion/1.0/default/SafeUnion.cpp index 4fb0974012..667da6e09e 100644 --- a/tests/safeunion/1.0/default/SafeUnion.cpp +++ b/tests/safeunion/1.0/default/SafeUnion.cpp @@ -202,7 +202,9 @@ Return<void> SafeUnion::setInterfaceB(const InterfaceTypeSafeUnion& myUnion, con return Void(); } -Return<void> SafeUnion::setInterfaceC(const InterfaceTypeSafeUnion& myUnion, const sp<::android::hardware::tests::safeunion::V1_0::IOtherInterface>& c, setInterfaceC_cb _hidl_cb) { +Return<void> SafeUnion::setInterfaceC(const InterfaceTypeSafeUnion& myUnion, + const sp<::android::hidl::base::V1_0::IBase>& c, + setInterfaceC_cb _hidl_cb) { LOG(INFO) << "SERVER(SafeUnion) setInterfaceC(myUnion, " << toString(c) << ")"; InterfaceTypeSafeUnion myNewUnion = myUnion; diff --git a/tests/safeunion/1.0/default/SafeUnion.h b/tests/safeunion/1.0/default/SafeUnion.h index ee3a95400e..b10575c99d 100644 --- a/tests/safeunion/1.0/default/SafeUnion.h +++ b/tests/safeunion/1.0/default/SafeUnion.h @@ -54,7 +54,9 @@ struct SafeUnion : public ISafeUnion { Return<void> newInterfaceTypeSafeUnion(newInterfaceTypeSafeUnion_cb _hidl_cb) override; Return<void> setInterfaceA(const InterfaceTypeSafeUnion& myUnion, uint32_t a, setInterfaceA_cb _hidl_cb) override; Return<void> setInterfaceB(const InterfaceTypeSafeUnion& myUnion, const hidl_array<int8_t, 7>& b, setInterfaceB_cb _hidl_cb) override; - Return<void> setInterfaceC(const InterfaceTypeSafeUnion& myUnion, const sp<::android::hardware::tests::safeunion::V1_0::IOtherInterface>& c, setInterfaceC_cb _hidl_cb) override; + Return<void> setInterfaceC(const InterfaceTypeSafeUnion& myUnion, + const sp<::android::hidl::base::V1_0::IBase>& c, + setInterfaceC_cb _hidl_cb) override; Return<void> setInterfaceD(const InterfaceTypeSafeUnion& myUnion, const hidl_string& d, setInterfaceD_cb _hidl_cb) override; Return<void> setInterfaceE(const InterfaceTypeSafeUnion& myUnion, const hidl_vec<hidl_string>& e, setInterfaceE_cb _hidl_cb) override; Return<void> setInterfaceF(const InterfaceTypeSafeUnion& myUnion, const hidl_handle& f, |