summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chia-chi Yeh <chiachi@android.com> 2011-06-07 18:18:56 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-06-07 18:18:56 -0700
commit5bc7c93ca7a40827120f232deca996630cd58a39 (patch)
tree4f32a87847bd49220fbc2215315767ccb7bf29f1
parent0e9e03f554a3cc7842035d043d50d97ade045382 (diff)
parent008ff39b7cb1a1f80f29595459fd82a55ce52b83 (diff)
Merge "Do not register the callbacks in the constructor."
-rw-r--r--services/java/com/android/server/ConnectivityService.java6
-rw-r--r--services/java/com/android/server/connectivity/Tethering.java7
2 files changed, 6 insertions, 7 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index dd76eb8c705c..b559fb900d13 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -458,6 +458,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
mTethering.getTetherableBluetoothRegexs().length != 0) &&
mTethering.getUpstreamIfaceRegexs().length != 0);
+ try {
+ nmService.registerObserver(mTethering);
+ } catch (RemoteException e) {
+ loge("Error registering observer :" + e);
+ }
+
if (DBG) {
mInetLog = new ArrayList();
}
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 7ea05916c2fd..5fa26ef5f03e 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -129,13 +129,6 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
mNMService = nmService;
mLooper = looper;
- // register for notifications from NetworkManagement Service
- try {
- mNMService.registerObserver(this);
- } catch (RemoteException e) {
- Log.e(TAG, "Error registering observer :" + e);
- }
-
mIfaces = new HashMap<String, TetherInterfaceSM>();
// make our own thread so we don't anr the system