summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/Utils.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-08-07 00:32:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-07 00:32:44 +0000
commitb75f10305dee24b1444735623f7c45b1a782606a (patch)
tree8b70f25fdbb68f3e8040073d0f1ac32a3b3554ef /src/com/android/settings/Utils.java
parent56f51a8927f53bee81145fe29e63af8a87e6fd1b (diff)
parent769f069a4701bd91a60219ca3ecd52d6990ca1ac (diff)
downloadpackages_apps_Settings-b75f10305dee24b1444735623f7c45b1a782606a.zip
packages_apps_Settings-b75f10305dee24b1444735623f7c45b1a782606a.tar.gz
packages_apps_Settings-b75f10305dee24b1444735623f7c45b1a782606a.tar.bz2
Merge "Display all link IP addresses, on different lines"
Diffstat (limited to 'src/com/android/settings/Utils.java')
-rw-r--r--src/com/android/settings/Utils.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 8614216..a8d0e8f 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -330,7 +330,7 @@ public class Utils {
/**
* Returns the WIFI IP Addresses, if any, taking into account IPv4 and IPv6 style addresses.
* @param context the application context
- * @return the formatted and comma-separated IP addresses, or null if none.
+ * @return the formatted and newline-separated IP addresses, or null if none.
*/
public static String getWifiIpAddresses(Context context) {
ConnectivityManager cm = (ConnectivityManager)
@@ -343,7 +343,7 @@ public class Utils {
* Returns the default link's IP addresses, if any, taking into account IPv4 and IPv6 style
* addresses.
* @param context the application context
- * @return the formatted and comma-separated IP addresses, or null if none.
+ * @return the formatted and newline-separated IP addresses, or null if none.
*/
public static String getDefaultIpAddresses(Context context) {
ConnectivityManager cm = (ConnectivityManager)
@@ -354,14 +354,14 @@ public class Utils {
private static String formatIpAddresses(LinkProperties prop) {
if (prop == null) return null;
- Iterator<InetAddress> iter = prop.getAddresses().iterator();
+ Iterator<InetAddress> iter = prop.getAllAddresses().iterator();
// If there are no entries, return null
if (!iter.hasNext()) return null;
// Concatenate all available addresses, comma separated
String addresses = "";
while (iter.hasNext()) {
addresses += iter.next().getHostAddress();
- if (iter.hasNext()) addresses += ", ";
+ if (iter.hasNext()) addresses += "\n";
}
return addresses;
}