From 514f40b0c32b1b8bd82c5a2190744b245acc4e12 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Thu, 15 Aug 2024 08:07:02 +0000 Subject: [PATCH] Add documentation on usage of net-utils-connectivity-apks Explain this is only for use by NetworkStack, CaptivePortalLogin, Tethering, and why. Change-Id: I7e2f6ee62aa65a47cf596af36d54d96ce50b4b1f --- staticlibs/Android.bp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/staticlibs/Android.bp b/staticlibs/Android.bp index ed0670df01..f47a23a211 100644 --- a/staticlibs/Android.bp +++ b/staticlibs/Android.bp @@ -531,6 +531,19 @@ java_library { ], } +// net-utils-connectivity-apks is only for NetworkStack, CaptivePortalLogin and +// Tethering.apk +// It includes all the static libraries in this directory, which is safe because +// these APKs use R8 to strip out unused code, and they do not depend on +// bootclasspath jars that may have duplicate copies of the included classes +// with the same jarjaring. +// Tethering.apk does depend on a bootclasspath jar (framework-tethering.jar), +// however it does not use any of the static libraries. If it did, Tethering.apk +// would need to use another variant that excludes classes that are already +// included in framework-tethering.jar (similarly to how framework-connectivity +// and service-connectivity do it). Otherwise, static libs included in +// framework-tethering and Tethering.apk and jarjared the same way would +// conflict. java_library { name: "net-utils-connectivity-apks", srcs: [