Clean up APN notifications.
Add APNType info to notifications so you can tell what's happening. Now, even if a new APN shares a connection with an already-connected-to- apn type, the new type will get all the connecting and connected messages on connect and disconnecting/disconnected on disconnect even though the shared connection remains connected. Cleaning out the hacks MobileDataStateTracker needed to deal with the old situation. bug:2226092 Change-Id: Iddd7421d6b91cda7c8405f9c3d5404ac04ef8e42
This commit is contained in:
@@ -597,15 +597,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
network.reconnect();
|
network.reconnect();
|
||||||
return Phone.APN_REQUEST_STARTED;
|
return Phone.APN_REQUEST_STARTED;
|
||||||
} else {
|
} else {
|
||||||
synchronized(this) {
|
return -1;
|
||||||
mFeatureUsers.add(f);
|
|
||||||
}
|
|
||||||
mHandler.sendMessageDelayed(mHandler.obtainMessage(
|
|
||||||
NetworkStateTracker.EVENT_RESTORE_DEFAULT_NETWORK,
|
|
||||||
f), getRestoreDefaultNetworkDelay());
|
|
||||||
|
|
||||||
return network.startUsingNetworkFeature(feature,
|
|
||||||
getCallingPid(), getCallingUid());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Phone.APN_TYPE_NOT_AVAILABLE;
|
return Phone.APN_TYPE_NOT_AVAILABLE;
|
||||||
@@ -724,8 +716,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
tracker.teardown();
|
tracker.teardown();
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
// do it the old fashioned way
|
return -1;
|
||||||
return tracker.stopUsingNetworkFeature(feature, pid, uid);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user