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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user