From 81c858241ed03b64250214298f0c8b6b7725767e Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Mon, 9 Jun 2014 22:58:46 +0900 Subject: [PATCH] Minor changes to the LinkAddress API docs. 1. Rename getNetworkPrefixLength to getPrefixLength. Update all callers in frameworks/base and add a shim method and a TODO for the rest. 2. @hide isSameAddressAs. It doesn't add much, and it's just one-liner that callers can implement if they want. 3. Fix the alignment of the initial paragraph (). 4. Remove the documentation that talks about creating LinkAddresses, since there's no public API for creating them. With these changes I think LinkAddress is fine as a public API. Bug: 15142362 Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c (cherry picked from commit 9ab53650cfcd91a2a151b44b3fd1381841f76269) --- services/core/java/com/android/server/net/IpConfigStore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/net/IpConfigStore.java b/services/core/java/com/android/server/net/IpConfigStore.java index aee7679225..dc4dc2eaaa 100644 --- a/services/core/java/com/android/server/net/IpConfigStore.java +++ b/services/core/java/com/android/server/net/IpConfigStore.java @@ -81,7 +81,7 @@ public class IpConfigStore { for (LinkAddress linkAddr : linkProperties.getLinkAddresses()) { out.writeUTF(LINK_ADDRESS_KEY); out.writeUTF(linkAddr.getAddress().getHostAddress()); - out.writeInt(linkAddr.getNetworkPrefixLength()); + out.writeInt(linkAddr.getPrefixLength()); } for (RouteInfo route : linkProperties.getRoutes()) { out.writeUTF(GATEWAY_KEY); @@ -89,7 +89,7 @@ public class IpConfigStore { if (dest != null) { out.writeInt(1); out.writeUTF(dest.getAddress().getHostAddress()); - out.writeInt(dest.getNetworkPrefixLength()); + out.writeInt(dest.getPrefixLength()); } else { out.writeInt(0); }