diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index ac6cb64..f28500e 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -306,6 +306,23 @@
         ConnectivityManager cm = (ConnectivityManager)
                 context.getSystemService(Context.CONNECTIVITY_SERVICE);
         LinkProperties prop = cm.getLinkProperties(ConnectivityManager.TYPE_WIFI);
+        return formatIpAddresses(prop);
+    }
+
+    /**
+     * 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.
+     */
+    public static String getDefaultIpAddresses(Context context) {
+        ConnectivityManager cm = (ConnectivityManager)
+                context.getSystemService(Context.CONNECTIVITY_SERVICE);
+        LinkProperties prop = cm.getActiveLinkProperties();
+        return formatIpAddresses(prop);
+    }
+
+    private static String formatIpAddresses(LinkProperties prop) {
         if (prop == null) return null;
         Iterator<InetAddress> iter = prop.getAddresses().iterator();
         // If there are no entries, return null
diff --git a/src/com/android/settings/deviceinfo/Status.java b/src/com/android/settings/deviceinfo/Status.java
index 57a8e94..d7116c1 100644
--- a/src/com/android/settings/deviceinfo/Status.java
+++ b/src/com/android/settings/deviceinfo/Status.java
@@ -78,7 +78,7 @@
     private static final String KEY_SIGNAL_STRENGTH = "signal_strength";
     private static final String KEY_BATTERY_STATUS = "battery_status";
     private static final String KEY_BATTERY_LEVEL = "battery_level";
-    private static final String KEY_WIFI_IP_ADDRESS = "wifi_ip_address";
+    private static final String KEY_IP_ADDRESS = "wifi_ip_address";
     private static final String KEY_WIFI_MAC_ADDRESS = "wifi_mac_address";
     private static final String KEY_BT_ADDRESS = "bt_address";
     private static final String KEY_SERIAL_NUMBER = "serial_number";
@@ -250,6 +250,7 @@
 
         setWifiStatus();
         setBtStatus();
+        setIpAddressStatus();
 
         String serial = Build.SERIAL;
         if (serial != null && !serial.equals("")) {
@@ -413,16 +414,19 @@
         WifiInfo wifiInfo = wifiManager.getConnectionInfo();
 
         Preference wifiMacAddressPref = findPreference(KEY_WIFI_MAC_ADDRESS);
+
         String macAddress = wifiInfo == null ? null : wifiInfo.getMacAddress();
         wifiMacAddressPref.setSummary(!TextUtils.isEmpty(macAddress) ? macAddress
                 : getString(R.string.status_unavailable));
+    }
 
-        Preference wifiIpAddressPref = findPreference(KEY_WIFI_IP_ADDRESS);
-        String ipAddress = Utils.getWifiIpAddresses(this);
+    private void setIpAddressStatus() {
+        Preference ipAddressPref = findPreference(KEY_IP_ADDRESS);
+        String ipAddress = Utils.getDefaultIpAddresses(this);
         if (ipAddress != null) {
-            wifiIpAddressPref.setSummary(ipAddress);
+            ipAddressPref.setSummary(ipAddress);
         } else {
-            wifiIpAddressPref.setSummary(getString(R.string.status_unavailable));
+            ipAddressPref.setSummary(getString(R.string.status_unavailable));
         }
     }
 
