From be0070934470a8eac43db2ee1a9eaa33d3d3ee41 Mon Sep 17 00:00:00 2001 From: Chalard Jean Date: Fri, 31 Jul 2020 20:00:30 +0900 Subject: Revert "Revert "Move Inet[4]AddressUtils to libs/net"" This patch is still needed and should go in now that the error is fixed. The patch was submitted into rvc-dev and is already in rvc-dev-plus-aosp (patch in in ag/11923559, revert skipped in ag/12072199). A follow-up will remove the unused services.net-module-wifi target. Test: originally tested in aosp/1324109 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Change-Id: I1074eedb0b0f156a1135e11210ec102de15ea674 Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b --- services/net/java/android/net/ip/IpClientCallbacks.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'services/net/java') diff --git a/services/net/java/android/net/ip/IpClientCallbacks.java b/services/net/java/android/net/ip/IpClientCallbacks.java index b172c4be7b0d..b17fcaa132a1 100644 --- a/services/net/java/android/net/ip/IpClientCallbacks.java +++ b/services/net/java/android/net/ip/IpClientCallbacks.java @@ -68,12 +68,13 @@ public class IpClientCallbacks { */ public void onNewDhcpResults(DhcpResultsParcelable dhcpResults) { // In general callbacks would not use a parcelable directly (DhcpResultsParcelable), and - // would use a wrapper instead. But there are already two classes in the tree for DHCP - // information: DhcpInfo and DhcpResults, and each of them do not expose an appropriate API - // (they are bags of mutable fields and can't be changed because they are public API and - // @UnsupportedAppUsage). Adding a third class would cost more than the gain considering - // that the only client of this callback is WiFi, which will end up converting the results - // to DhcpInfo anyway. + // would use a wrapper instead, because of the lack of safety of stable parcelables. But + // there are already two classes in the tree for DHCP information: DhcpInfo and DhcpResults, + // and neither of them exposes an appropriate API (they are bags of mutable fields and can't + // be changed because they are public API and @UnsupportedAppUsage, being no better than the + // stable parcelable). Adding a third class would cost more than the gain considering that + // the only client of this callback is WiFi, which will end up converting the results to + // DhcpInfo anyway. } /** -- cgit v1.2.3-59-g8ed1b