services.net: Add a static library needed by wifi module
Add a new static library that compiles against system_current which
includes all the parts needed by the wifi mainline module.
Also,
a) Refactored TcpKeepalivePacketData to use public APIs. The parcel
read/write methods in the base class are @hide and they're not used by
the other child class (NatKeepalivePacketData). So, remove the @hide
method from base class and use it direcly in the child class.
b) Add jar-jar rules for all the statically linked dependencies in wifi
service jar rules.
Exempt-From-Owner-Approval: Minor change on top of owner's approval.
Bug: 145825329
Test: Device boots up & connects to wifi networks.
Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c
diff --git a/Android.bp b/Android.bp
index 9c1a085..494110f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -694,6 +694,7 @@
"core/java/android/annotation/CallbackExecutor.java",
"core/java/android/annotation/CheckResult.java",
"core/java/android/annotation/CurrentTimeMillisLong.java",
+ "core/java/android/annotation/Hide.java",
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/IntRange.java",
"core/java/android/annotation/LongDef.java",
@@ -753,6 +754,18 @@
],
}
+filegroup {
+ name: "framework-services-net-module-wifi-shared-srcs",
+ srcs: [
+ "core/java/android/net/DhcpResults.java",
+ "core/java/android/net/shared/Inet4AddressUtils.java",
+ "core/java/android/net/shared/InetAddressUtils.java",
+ "core/java/android/net/util/IpUtils.java",
+ "core/java/android/util/LocalLog.java",
+ "core/java/com/android/internal/util/Preconditions.java",
+ ],
+}
+
// keep these files in sync with the package/Tethering/jarjar-rules.txt for the tethering module.
filegroup {
name: "framework-tethering-shared-srcs",
@@ -1241,7 +1254,6 @@
"core/java/android/net/InterfaceConfiguration.java",
"core/java/android/os/BasicShellCommandHandler.java",
"core/java/android/util/BackupUtils.java",
- "core/java/android/util/LocalLog.java",
"core/java/android/util/Rational.java",
"core/java/com/android/internal/util/FastXmlSerializer.java",
"core/java/com/android/internal/util/HexDump.java",