Add missing Javadoc dependency to `framework-nfc`
The `CardEmulation.java` file imports `android.app.role.RoleManager`
and references it from some method bodies and the Javadoc of some of
its API members. Strictly speaking, that class should have been
imported in the stubs to ensure that the references in the Javadoc
could be correctly resolved. However, due to some inaccurate handling
of imports in Metalava the import was not added to the stubs.
The handling of imports in Metalava will be improved and so the class
will be correctly imported. However, that would lead to a compile time
failure because `RoleManager` is not on the classpath when compiling
the stubs. This change avoids that by adding the missing dependency
in preparation for the Metalava changes.
Bug: 371955471
Test: m droid
tools/metalava/scripts/gather-android-metalava-artifacts.py before
tools/metalava/scripts/gather-android-metalava-artifacts.py after
meld before after
Change-Id: Id2e10482baec9031541efab7c9496be2b76cb8e7
diff --git a/nfc/Android.bp b/nfc/Android.bp
index db3dcb0..7ad8c4c 100644
--- a/nfc/Android.bp
+++ b/nfc/Android.bp
@@ -41,6 +41,10 @@
"framework-permission-s.stubs.module_lib",
"framework-permission.stubs.module_lib",
],
+ stub_only_libs: [
+ // Needed for javadoc references.
+ "framework-permission-s.stubs.module_lib",
+ ],
static_libs: [
"android.nfc.flags-aconfig-java",
"android.permission.flags-aconfig-java",