• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

frameworks/base


コミットメタ情報

リビジョン789df167fa31e684baa957aea1a4430963bf12b1 (tree)
日時2011-07-24 05:48:12
作者Kazuhiro Ondo <kazuhiro.ondo@moto...>
コミッターWink Saville

ログメッセージ

Configure RAT dependent retry pattern in GSM DCT.

In case GSM DCT is used with EHRPD, retry pattern should follow
the ones for CDMA.

Bug: 5058426
Change-Id: Id9badc9ac14fb20ac62c1746061f056fa2f9ed1b

変更サマリ

差分

--- 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);
@@ -2022,20 +2033,18 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
20222033 return conn;
20232034 }
20242035
2025- private void configureRetry(DataConnection dc, String apnType) {
2026- if ((dc == null) || (apnType == null)) return;
2036+ private void configureRetry(DataConnection dc, boolean forDefault) {
2037+ if (dc == null) return;
20272038
2028- if (apnType.equals(Phone.APN_TYPE_DEFAULT)) {
2029- if (!dc.configureRetry(SystemProperties.get("ro.gsm.data_retry_config"))) {
2039+ if (!dc.configureRetry(getReryConfig(forDefault))) {
2040+ if (forDefault) {
20302041 if (!dc.configureRetry(DEFAULT_DATA_RETRY_CONFIG)) {
20312042 // Should never happen, log an error and default to a simple linear sequence.
20322043 loge("configureRetry: Could not configure using " +
20332044 "DEFAULT_DATA_RETRY_CONFIG=" + DEFAULT_DATA_RETRY_CONFIG);
20342045 dc.configureRetry(20, 2000, 1000);
20352046 }
2036- }
2037- } else {
2038- if (!dc.configureRetry(SystemProperties.get("ro.gsm.2nd_data_retry_config"))) {
2047+ } else {
20392048 if (!dc.configureRetry(SECONDARY_DATA_RETRY_CONFIG)) {
20402049 // Should never happen, log an error and default to a simple sequence.
20412050 loge("configureRetry: Could note configure using " +