Cache preferences and services in status dialog.

Currently, the status dialog fetches the preferences and system
services that it uses to display connectivity information (e.g.,
IP and MAC addresses) only when the dialog is first opened. This
is fine because the connectivity information is only filled in
once and never updated.

In order to have this information update dynamically (like the
rest of the dialog), fetch and cache these objects in onCreate.
The next change will actually make this information update on
network changes.

Bug: 10232006
Change-Id: Ib4072674543e517cf6935e3e03f35090e728090a
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index a8d0e8f..b9e729c 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -345,9 +345,7 @@
      * @param context the application context
      * @return the formatted and newline-separated IP addresses, or null if none.
      */
-    public static String getDefaultIpAddresses(Context context) {
-        ConnectivityManager cm = (ConnectivityManager)
-                context.getSystemService(Context.CONNECTIVITY_SERVICE);
+    public static String getDefaultIpAddresses(ConnectivityManager cm) {
         LinkProperties prop = cm.getActiveLinkProperties();
         return formatIpAddresses(prop);
     }