Make HiPri work when already connected.

A recent change made the HiPri MobileDataStateTracker listen for notifications
about the default connection (which HiPri shadows).  Local code was sending
itself a notification using the old HiPri badging instead of the new Default
badging and those notifications where therefore ignored.

Manifested itself on HiPri connections when we were already on 3g.

See change 42422 on master platform/frameworks/base for the change this is completing.

Change-Id: I375026048724d0035297287c61c6c2f58d4e0294
This commit is contained in:
Robert Greenwalt
2010-03-10 16:10:43 -08:00
parent 129843273d
commit 46ceefadaa

View File

@@ -668,6 +668,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
synchronized(this) {
// check if this process still has an outstanding start request
if (!mFeatureUsers.contains(u)) {
if (DBG) Slog.d(TAG, "ignoring - this process has no outstanding requests");
return 1;
}
u.unlinkDeathRecipient();
@@ -706,6 +707,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
tracker = mNetTrackers[usedNetworkType];
if (tracker == null) {
if (DBG) Slog.d(TAG, "ignoring - no known tracker for net type " + usedNetworkType);
return -1;
}
if (usedNetworkType != networkType) {
@@ -720,7 +722,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
callTeardown = true;
}
}
if (DBG) Slog.d(TAG, "Doing network teardown");
if (callTeardown) {
tracker.teardown();
return 1;