From eb22daaf5bf79d33fe09b995466a12a09c17c3c6 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Fri, 31 Jan 2020 15:05:22 +0900 Subject: Fix usage of annotations in TetheringLib Annotations such as @SystemApi cannot be jarjared to a different package, as the members would not match the system API declarations. Instead, only build against the annotations from framework-annotations-lib, but do not include them as classes in the output jar; annotations are not required to be available to the classloader at runtime. Test: builds, boots, tethering working Bug: 147812912 Fixes: 148609988 Change-Id: I1fae97a1c1e0ba07fa3e2d64cde7650cd26d0acd --- packages/Tethering/Android.bp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'packages/Tethering/Android.bp') diff --git a/packages/Tethering/Android.bp b/packages/Tethering/Android.bp index cf2b1f06d769..1083adbced53 100644 --- a/packages/Tethering/Android.bp +++ b/packages/Tethering/Android.bp @@ -16,7 +16,8 @@ java_defaults { name: "TetheringAndroidLibraryDefaults", - sdk_version: "system_current", + // TODO (b/146757305): change to module API once available + sdk_version: "core_platform", srcs: [ "src/**/*.java", ":framework-tethering-shared-srcs", @@ -34,6 +35,8 @@ java_defaults { libs: [ "framework-tethering", "unsupportedappusage", + "android_system_stubs_current", + "framework-res", ], plugins: ["java_api_finder"], manifest: "AndroidManifestBase.xml", @@ -81,7 +84,8 @@ cc_library { // Common defaults for compiling the actual APK. java_defaults { name: "TetheringAppDefaults", - sdk_version: "system_current", + // TODO (b/146757305): change to module API once available + sdk_version: "core_platform", privileged: true, // Build system doesn't track transitive dependeicies for jni_libs, list all the dependencies // explicitly. @@ -96,6 +100,8 @@ java_defaults { ], libs: [ "framework-tethering", + "android_system_stubs_current", + "framework-res", ], jarjar_rules: "jarjar-rules.txt", optimize: { -- cgit v1.2.3-59-g8ed1b