I was trying to create an Android system service with C++ and make it callable from Java clients. So far the C++ servcie is up and running, but I don’t see AOSP generated Java files from the AIDL file. I am attaching the AIDL file and Android.bp below. Did I miss something in the Android.bp? Java backend is already enabled.
Where is the location of the Java files generated from AIDL? Thanks!
AIDL:
package helloworld.service;
@VintfStability
interface IHelloworldService {
int getNumber ();
}
Android.bp
cc_binary {
name: "helloworld_service",
srcs: ["src/**/*.cpp"],
device_specific: true,
init_rc: ["helloworld_service.rc"],
shared_libs: [
"liblog",
"libutils",
"libbase",
"libbinder_ndk",
"helloworld.service-V2-ndk",
],
vintf_fragments: ["hs_vintf_frag.xml"],
}
aidl_interface {
name: "helloworld.service.api",
vendor_available: true,
srcs: ["interfaces/**/*.aidl"],
local_include_dir: "interfaces",
stability: "vintf",
backend: {
java: {
enabled: true,
platform_apis: true,
},
cpp: {
enabled: true,
},
ndk: {
enabled: true,
},
},
versions_with_info: [
{
version: "2",
imports: [],
},
],
}
}