commit | 164ca032b609c9590b41dfd83c13317612e43b2f | [log] [tgz] |
---|---|---|
author | Robert Greenwalt <rgreenwalt@google.com> | Thu Jan 27 16:35:18 2011 -0800 |
committer | Robert Greenwalt <rgreenwalt@google.com> | Thu Jan 27 17:48:52 2011 -0800 |
tree | 7972b1c8a1b108222fea457cb59d2fa849705ec0 | |
parent | a85b789a4a6c58c33dda9e5b00a10faee6bbf561 [diff] |
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
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java index 19e7fae..a7f7866 100755 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -1069,6 +1069,8 @@ 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
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java index c107d17..bb99e45 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -957,6 +957,9 @@ 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