summaryrefslogtreecommitdiff
path: root/services/net/java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2020-06-08 15:40:06 +0900
committerRemi NGUYEN VAN <reminv@google.com>2020-07-02 10:52:31 +0900
commit57d68e3c55176083ba40947be8f335534d958006 (patch)
tree5e64736675fecc8b872e5cd67f7a4462b7d5517f /services/net/java
parent2f3b72b8efc65769ff44387fbbc14354fcee0f8e (diff)
Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are part of several mainline modules. Also refine comments in DhcpResults following feedback in previous change. (cherry-pick from internal branch skipping wifi classes; no other conflict) Bug: 151052811 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Merged-In: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f Change-Id: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f
Diffstat (limited to 'services/net/java')
-rw-r--r--services/net/java/android/net/ip/IpClientCallbacks.java13
1 files changed, 7 insertions, 6 deletions
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.
}
/**