summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/ConnectivityService.java
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2011-05-11 16:35:13 -0700
committerChia-chi Yeh <chiachi@android.com>2011-05-11 17:06:07 -0700
commitc9338305bf4d5cfb9ec2a1d64144d8cef32a00a5 (patch)
tree8d3789b4295184c0e82d2ffa28d89fcb2591694f /services/java/com/android/server/ConnectivityService.java
parente8c926868f507d97b187f08dea409d4648022ef7 (diff)
Extract NetworkManagementService out from Tethering to ConnectivityService.
and also some minor refactoring. Change-Id: I0e74f30ef1b035d9ed37571c512fedc15d05db77
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r--services/java/com/android/server/ConnectivityService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index a9a7af459bb7..db831c79b29e 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -41,6 +41,7 @@ import android.os.Binder;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
+import android.os.INetworkManagementService;
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
@@ -425,7 +426,10 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
- mTethering = new Tethering(mContext, mHandler.getLooper());
+ IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
+ INetworkManagementService nmService = INetworkManagementService.Stub.asInterface(b);
+
+ mTethering = new Tethering(mContext, nmService, mHandler.getLooper());
mTetheringConfigValid = (((mNetTrackers[ConnectivityManager.TYPE_MOBILE_DUN] != null) ||
!mTethering.isDunRequired()) &&
(mTethering.getTetherableUsbRegexs().length != 0 ||