Fix data network type notifications.

These trackers have two copies of the network type: newSS and newNetworkType.  I think thats wrong,
but this was the smaller change on code that will hopefully be refactored soon.

On radio_off we were making a new, empty newSS but not clearing newNetworkType so it
still thought we were on 3G and when we reconnect and get 3G state changes new==old and we don't
send the update.  In this fix I reset newNetworkType every time we apply it to networkType.

bug:3389886
Change-Id: I294f34259dc6c6f8f445bf2cb5466c8be747e25c
This commit is contained in:
Robert Greenwalt
2011-01-27 16:35:18 -08:00
parent a85b789a4a
commit 164ca032b6
2 changed files with 5 additions and 0 deletions

View File

@@ -1069,6 +1069,8 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
cdmaDataConnectionState = newCdmaDataConnectionState;
networkType = newNetworkType;
// this new state has been applied - forget it until we get a new new state
newNetworkType = 0;
newSS.setStateOutOfService(); // clean slate for next time

View File

@@ -957,6 +957,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
gprsState = newGPRSState;
networkType = newNetworkType;
// this new state has been applied - forget it until we get a new new state
newNetworkType = 0;
newSS.setStateOutOfService(); // clean slate for next time