/**
* Use with {@link #getSystemService} to retrieve a {@link
+ * android.net.NetworkManagementService} for handling management of
+ * system network services
+ *
+ * @hide
+ * @see #getSystemService
+ * @see android.net.NetworkManagementService
+ */
+ public static final String NETWORKMANAGEMENT_SERVICE = "network_management";
+
+ /**
+ * Use with {@link #getSystemService} to retrieve a {@link
* android.net.wifi.WifiManager} for handling management of
* Wi-Fi access.
*
*
* @param context Binder context for this service
*/
- private NetworkManagementService(Context context) {
+ public NetworkManagementService(Context context) {
mContext = context;
mObservers = new ArrayList<INetworkManagementEventObserver>();
}
try {
+ Log.i(TAG, "NetworkManagement Service");
+ ServiceManager.addService(
+ Context.NETWORKMANAGEMENT_SERVICE, new NetworkManagementService(context));
+ } catch (Throwable e) {
+ Log.e(TAG, "Failure starting NetworkManagement Service", e);
+ }
+
+ try {
Log.i(TAG, "Connectivity Service");
connectivity = ConnectivityService.getInstance(context);
ServiceManager.addService(Context.CONNECTIVITY_SERVICE, connectivity);