• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Revisiondeb62be2e87b19e9bbbc668f8d9327b12dba4a3b (tree)
Time2011-07-25 01:11:28
AuthorWink Saville <wink@goog...>
CommiterAndroid (Google) Code Review

Log Message

Merge "Configure RAT dependent retry pattern in GSM DCT." into honeycomb-LTE

Change Summary

Incremental Difference

--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -34,6 +34,7 @@ import android.os.Messenger;
3434 import android.os.SystemProperties;
3535 import android.preference.PreferenceManager;
3636 import android.provider.Settings;
37+import android.telephony.ServiceState;
3738 import android.provider.Settings.SettingNotFoundException;
3839 import android.text.TextUtils;
3940 import android.util.Log;
@@ -993,6 +994,27 @@ public abstract class DataConnectionTracker extends Handler {
993994 protected void onSetDependencyMet(String apnType, boolean met) {
994995 }
995996
997+ protected String getReryConfig(boolean forDefault) {
998+ int rt = mPhone.getServiceState().getRadioTechnology();
999+
1000+ if ((rt == ServiceState.RADIO_TECHNOLOGY_IS95A) ||
1001+ (rt == ServiceState.RADIO_TECHNOLOGY_IS95B) ||
1002+ (rt == ServiceState.RADIO_TECHNOLOGY_1xRTT) ||
1003+ (rt == ServiceState.RADIO_TECHNOLOGY_EVDO_0) ||
1004+ (rt == ServiceState.RADIO_TECHNOLOGY_EVDO_A) ||
1005+ (rt == ServiceState.RADIO_TECHNOLOGY_EVDO_B) ||
1006+ (rt == ServiceState.RADIO_TECHNOLOGY_EHRPD)) {
1007+ // CDMA variant
1008+ return SystemProperties.get("ro.cdma.data_retry_config");
1009+ } else {
1010+ // Use GSM varient for all others.
1011+ if (forDefault) {
1012+ return SystemProperties.get("ro.gsm.data_retry_config");
1013+ } else {
1014+ return SystemProperties.get("ro.gsm.2nd_data_retry_config");
1015+ }
1016+ }
1017+ }
9961018
9971019 protected void resetAllRetryCounts() {
9981020 for (DataConnection dc : mDataConnections.values()) {
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java
@@ -247,10 +247,11 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
247247 boolean hasLocationChanged = !newCellLoc.equals(cellLoc);
248248
249249 boolean has4gHandoff =
250- ((networkType == ServiceState.RADIO_TECHNOLOGY_LTE) &&
251- (newNetworkType == ServiceState.RADIO_TECHNOLOGY_EHRPD)) ||
252- ((networkType == ServiceState.RADIO_TECHNOLOGY_EHRPD) &&
253- (newNetworkType == ServiceState.RADIO_TECHNOLOGY_LTE));
250+ mNewDataConnectionState == ServiceState.STATE_IN_SERVICE &&
251+ (((networkType == ServiceState.RADIO_TECHNOLOGY_LTE) &&
252+ (newNetworkType == ServiceState.RADIO_TECHNOLOGY_EHRPD)) ||
253+ ((networkType == ServiceState.RADIO_TECHNOLOGY_EHRPD) &&
254+ (newNetworkType == ServiceState.RADIO_TECHNOLOGY_LTE)));
254255
255256 boolean hasMultiApnSupport =
256257 (((newNetworkType == ServiceState.RADIO_TECHNOLOGY_LTE) ||
@@ -391,7 +392,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
391392 phone.notifyServiceStateChanged(ss);
392393 }
393394
394- if (hasCdmaDataConnectionAttached) {
395+ if (hasCdmaDataConnectionAttached || has4gHandoff) {
395396 mAttachedRegistrants.notifyRegistrants();
396397 }
397398
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -609,9 +609,20 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
609609 for (DataConnectionAc dcac : mDataConnectionAsyncChannels.values()) {
610610 if (dcac.getReconnectIntentSync() != null) {
611611 cancelReconnectAlarm(dcac);
612- if (dcac.dataConnection != null) {
613- dcac.dataConnection.resetRetryCount();
612+ }
613+ // update retry config for existing calls to match up
614+ // ones for the new RAT.
615+ if (dcac.dataConnection != null) {
616+ Collection<ApnContext> apns = dcac.getApnListSync();
617+
618+ boolean hasDefault = false;
619+ for (ApnContext apnContext : apns) {
620+ if (apnContext.getApnType().equals(Phone.APN_TYPE_DEFAULT)) {
621+ hasDefault = true;
622+ break;
623+ }
614624 }
625+ configureRetry(dcac.dataConnection, hasDefault);
615626 }
616627 }
617628
@@ -973,7 +984,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
973984
974985 // configure retry count if no other Apn is using the same connection.
975986 if (refCount == 0) {
976- configureRetry(dc, apnContext.getApnType());
987+ configureRetry(dc, apn.canHandleType(Phone.APN_TYPE_DEFAULT));
977988 }
978989 apnContext.setDataConnectionAc(dcac);
979990 apnContext.setDataConnection(dc);
@@ -2026,20 +2037,18 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
20262037 return conn;
20272038 }
20282039
2029- private void configureRetry(DataConnection dc, String apnType) {
2030- if ((dc == null) || (apnType == null)) return;
2040+ private void configureRetry(DataConnection dc, boolean forDefault) {
2041+ if (dc == null) return;
20312042
2032- if (apnType.equals(Phone.APN_TYPE_DEFAULT)) {
2033- if (!dc.configureRetry(SystemProperties.get("ro.gsm.data_retry_config"))) {
2043+ if (!dc.configureRetry(getReryConfig(forDefault))) {
2044+ if (forDefault) {
20342045 if (!dc.configureRetry(DEFAULT_DATA_RETRY_CONFIG)) {
20352046 // Should never happen, log an error and default to a simple linear sequence.
20362047 loge("configureRetry: Could not configure using " +
20372048 "DEFAULT_DATA_RETRY_CONFIG=" + DEFAULT_DATA_RETRY_CONFIG);
20382049 dc.configureRetry(20, 2000, 1000);
20392050 }
2040- }
2041- } else {
2042- if (!dc.configureRetry(SystemProperties.get("ro.gsm.2nd_data_retry_config"))) {
2051+ } else {
20432052 if (!dc.configureRetry(SECONDARY_DATA_RETRY_CONFIG)) {
20442053 // Should never happen, log an error and default to a simple sequence.
20452054 loge("configureRetry: Could note configure using " +