Decouple "net-utils-framework-common" from "net-utils-device-common-bpf"
Currently "net-utils-device-common-bpf" statically link whole
"net-utils-device-common-struct" which would also pull in
"net-utils-framework-common". Since the classes in
net-utils-framework-common would be loaded into bootclass path, it would
cause sytem server service which located in platform code (the class in
/system/framework/service.jar) not able to use net-utils-device-common-bpf
library.
There is a cts to protect this:
StrictJavaPackagesTest#testBootClasspathAndSystemServerClasspath_nonDuplicateClasses
Bug: 215095957
Test: atest FrameworkNetTests
Change-Id: I232bd21c666dd44f7d0b8cc84610e8cd37dc383c
diff --git a/staticlibs/Android.bp b/staticlibs/Android.bp
index f1dbbcd..ba545ea 100644
--- a/staticlibs/Android.bp
+++ b/staticlibs/Android.bp
@@ -111,8 +111,10 @@
name: "net-utils-device-common-bpf",
srcs: [
"device/com/android/net/module/util/BpfMap.java",
+ "device/com/android/net/module/util/HexDump.java",
"device/com/android/net/module/util/IBpfMap.java",
"device/com/android/net/module/util/JniUtil.java",
+ "device/com/android/net/module/util/Struct.java",
"device/com/android/net/module/util/TcUtils.java",
],
sdk_version: "system_current",
@@ -124,9 +126,6 @@
"//packages/modules/NetworkStack:__subpackages__",
"//frameworks/base/services/core",
],
- static_libs: [
- "net-utils-device-common-struct",
- ],
libs: [
"androidx.annotation_annotation",
],