From 57bca318f1401c200a75aa20e0f1e9e97f69131a Mon Sep 17 00:00:00 2001 From: David Su Date: Tue, 21 Apr 2020 19:49:32 -0700 Subject: [PATCH] framework-wifi: remove duplicate classes Preconditions & Inet4AddressUtils are statically linked into both framework-wifi and service-wifi. This creates duplicate classes, which should be avoided. Instead, service-wifi should simply refer to the copy of Preconditions/Inet4AddressUtils in framework-wifi. Bug: 153596226 Test: device boots up and connects to wifi Change-Id: Ie78e5cf0f6ff7bc8a2fa8d7264b742f912601143 --- Android.bp | 7 ++++--- services/net/Android.bp | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Android.bp b/Android.bp index bd30de2c6749..8d3b4af82bc8 100644 --- a/Android.bp +++ b/Android.bp @@ -708,11 +708,9 @@ 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", ], } @@ -1175,7 +1173,10 @@ java_library { "framework-annotations-lib", "unsupportedappusage", ], - visibility: ["//frameworks/base/wifi"], + visibility: [ + "//frameworks/base/wifi", + "//frameworks/base/services/net", + ], } filegroup { diff --git a/services/net/Android.bp b/services/net/Android.bp index 9f2979906d42..bb5409b3e032 100644 --- a/services/net/Android.bp +++ b/services/net/Android.bp @@ -41,6 +41,7 @@ java_library { sdk_version: "module_current", libs: [ "unsupportedappusage", + "framework-wifi-util-lib", ], static_libs: [ "dnsresolver_aidl_interface-V2-java",