Do not register the callbacks in the constructor.

Change-Id: Ic7509c35cfb17b022a2af3cc14170942d6510e2d
This commit is contained in:
Chia-chi Yeh
2011-05-23 15:08:29 -07:00
parent 560e97f8e0
commit 008ff39b7c
2 changed files with 6 additions and 7 deletions

View File

@@ -441,6 +441,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();
}

View File

@@ -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