From 16998b5fb0ae1a558fa2b46b1d6d5401be85f749 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Thu, 11 Oct 2018 15:29:26 -0700 Subject: NdkBinderTest: update for different header locs For an interface 'my.package.IFoo', we generate: CPP Backend -> ::my::package::IFoo NDK Backend -> ::aidl::my::package::IFoo Before this change their headers were located in the same location: CPP Backend -> "my/package/*Foo.h" NDK Backend -> "my/package/*Foo.h" Now, NDK Backend headers correspond to their namespace: CPP Backend -> "my/package/*Foo.h" NDK Backend -> "aidl/my/package/*Foo.h" This prevents header collisions just like the separate packages prevents ODR violations. Header collisions are expected when one library uses the cpp backend and the other uses the ndk backend. For instance, imagine 'libfoo' is APEXified and uses the NDK backend. However, food (foo daemon) uses both libfoo and the CPP Backend to talk to the service. In this case, the pre-existing headers would collide. Bug: 112664205 Test: atest android.binder.cts Change-Id: Ia4b909ebc5b60a14d4275557f8104e6c1c5dd2ca --- tests/tests/binder_ndk/libbinder_ndk_test/itest_impl.h | 2 +- .../tests/binder_ndk/libbinder_ndk_test/test_native_aidl_client.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/tests/binder_ndk/libbinder_ndk_test/itest_impl.h b/tests/tests/binder_ndk/libbinder_ndk_test/itest_impl.h index b81e25ef965..044a2e40b74 100644 --- a/tests/tests/binder_ndk/libbinder_ndk_test/itest_impl.h +++ b/tests/tests/binder_ndk/libbinder_ndk_test/itest_impl.h @@ -14,7 +14,7 @@ * limitations under the License. */ -#include +#include #include "utilities.h" diff --git a/tests/tests/binder_ndk/libbinder_ndk_test/test_native_aidl_client.cpp b/tests/tests/binder_ndk/libbinder_ndk_test/test_native_aidl_client.cpp index 576c624e1ab..8889baff991 100644 --- a/tests/tests/binder_ndk/libbinder_ndk_test/test_native_aidl_client.cpp +++ b/tests/tests/binder_ndk/libbinder_ndk_test/test_native_aidl_client.cpp @@ -17,9 +17,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "itest_impl.h" #include "utilities.h" -- cgit v1.2.3