Android O MR1 IOT Release Smart Display r3 (OIM3.180907.022)
NDK Backend: different header locations

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: Iba6e9c2e4a37fa3c9c9115f65c48e0991057c7f2
4 files changed