summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-04-13 21:37:13 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-04-13 21:37:13 -0700
commitcdb02c136a4357f8504ccbea6f4b0c1690eae80d (patch)
tree8b985a4fdc1f54c77252314203447554c7b7efea /telephony/java
parent19bd253ed34e871aa0b8388dd571787ed2550170 (diff)
parent44038aa032ffd876f3c9b20a84db9d189f77e18e (diff)
downloadframeworks_base-cdb02c136a4357f8504ccbea6f4b0c1690eae80d.zip
frameworks_base-cdb02c136a4357f8504ccbea6f4b0c1690eae80d.tar.gz
frameworks_base-cdb02c136a4357f8504ccbea6f4b0c1690eae80d.tar.bz2
Merge change 105 into donut
* changes: Fix crash when mSST is null and change default to GSM.
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/Phone.java2
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneFactory.java21
-rw-r--r--telephony/java/com/android/internal/telephony/RIL.java14
-rw-r--r--telephony/java/com/android/internal/telephony/RILConstants.java2
-rwxr-xr-x[-rw-r--r--]telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java5
-rwxr-xr-x[-rw-r--r--]telephony/java/com/android/internal/telephony/gsm/GSMPhone.java5
6 files changed, 25 insertions, 24 deletions
diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java
index ed90d32..62949b0 100644
--- a/telephony/java/com/android/internal/telephony/Phone.java
+++ b/telephony/java/com/android/internal/telephony/Phone.java
@@ -170,7 +170,7 @@ public interface Phone {
int NT_MODE_EVDO_NO_CDMA = 6; /* EvDo only */
int NT_MODE_GLOBAL = 7; /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
AVAILABLE Application Settings menu*/
- int PREFERRED_NT_MODE = NT_MODE_GLOBAL;
+ int PREFERRED_NT_MODE = NT_MODE_GSM_ONLY;
// Used for CDMA roaming mode
diff --git a/telephony/java/com/android/internal/telephony/PhoneFactory.java b/telephony/java/com/android/internal/telephony/PhoneFactory.java
index 3db0499..86e2f04 100644
--- a/telephony/java/com/android/internal/telephony/PhoneFactory.java
+++ b/telephony/java/com/android/internal/telephony/PhoneFactory.java
@@ -108,26 +108,23 @@ public class PhoneFactory {
sCommandsInterface = new RIL(context, networkMode, cdmaSubscription);
switch(networkMode) {
- case RILConstants.NETWORK_MODE_WCDMA_PREF:
- case RILConstants.NETWORK_MODE_GSM_ONLY:
- case RILConstants.NETWORK_MODE_WCDMA_ONLY:
- case RILConstants.NETWORK_MODE_GSM_UMTS:
- sProxyPhone = new PhoneProxy(new GSMPhone(context,
- sCommandsInterface, sPhoneNotifier));
- Log.i(LOG_TAG, "Creating GSMPhone");
- break;
case RILConstants.NETWORK_MODE_CDMA:
case RILConstants.NETWORK_MODE_CDMA_NO_EVDO:
case RILConstants.NETWORK_MODE_EVDO_NO_CDMA:
+ case RILConstants.NETWORK_MODE_GLOBAL:
sProxyPhone = new PhoneProxy(new CDMAPhone(context,
sCommandsInterface, sPhoneNotifier));
Log.i(LOG_TAG, "Creating CDMAPhone");
break;
- case RILConstants.NETWORK_MODE_GLOBAL:
+ case RILConstants.NETWORK_MODE_WCDMA_PREF:
+ case RILConstants.NETWORK_MODE_GSM_ONLY:
+ case RILConstants.NETWORK_MODE_WCDMA_ONLY:
+ case RILConstants.NETWORK_MODE_GSM_UMTS:
default:
- sProxyPhone = new PhoneProxy(new CDMAPhone(context,
+ sProxyPhone = new PhoneProxy(new GSMPhone(context,
sCommandsInterface, sPhoneNotifier));
- Log.i(LOG_TAG, "Creating CDMAPhone");
+ Log.i(LOG_TAG, "Creating GSMPhone");
+ break;
}
sMadeDefaults = true;
}
@@ -160,5 +157,3 @@ public class PhoneFactory {
}
}
}
-
-
diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java
index f5d3b32..636a223 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -565,22 +565,18 @@ public final class RIL extends BaseCommands implements CommandsInterface {
mNetworkMode = networkMode;
//At startup mPhoneType is first set from networkMode
switch(networkMode) {
- case RILConstants.NETWORK_MODE_WCDMA_PREF:
- case RILConstants.NETWORK_MODE_GSM_ONLY:
- case RILConstants.NETWORK_MODE_WCDMA_ONLY:
- case RILConstants.NETWORK_MODE_GSM_UMTS:
- mPhoneType = RILConstants.GSM_PHONE;
- break;
case RILConstants.NETWORK_MODE_CDMA:
case RILConstants.NETWORK_MODE_CDMA_NO_EVDO:
case RILConstants.NETWORK_MODE_EVDO_NO_CDMA:
- mPhoneType = RILConstants.CDMA_PHONE;
- break;
case RILConstants.NETWORK_MODE_GLOBAL:
mPhoneType = RILConstants.CDMA_PHONE;
break;
+ case RILConstants.NETWORK_MODE_WCDMA_PREF:
+ case RILConstants.NETWORK_MODE_GSM_ONLY:
+ case RILConstants.NETWORK_MODE_WCDMA_ONLY:
+ case RILConstants.NETWORK_MODE_GSM_UMTS:
default:
- mPhoneType = RILConstants.CDMA_PHONE;
+ mPhoneType = RILConstants.GSM_PHONE;
}
PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index 028aad7..9c63627 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -51,7 +51,7 @@ public interface RILConstants {
int NETWORK_MODE_EVDO_NO_CDMA = 6; /* EvDo only */
int NETWORK_MODE_GLOBAL = 7; /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
AVAILABLE Application Settings menu*/
- int PREFERRED_NETWORK_MODE = NETWORK_MODE_GLOBAL;
+ int PREFERRED_NETWORK_MODE = NETWORK_MODE_GSM_ONLY;
/* CDMA subscription source. See ril.h RIL_REQUEST_CDMA_SET_SUBSCRIPTION */
int SUBSCRIPTION_FROM_RUIM = 0; /* CDMA subscription from RUIM when available */
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index c139619..8ffb7ec 100644..100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -475,6 +475,11 @@ public class CDMAPhone extends PhoneBase {
// we report data connected
ret = DataState.CONNECTED;
+ } else if (mSST == null) {
+ // Radio Technology Change is ongoning, dispose() and removeReferences() have
+ // already been called
+
+ ret = DataState.DISCONNECTED;
} else if (mSST.getCurrentCdmaDataConnectionState()
== ServiceState.RADIO_TECHNOLOGY_UNKNOWN) {
// If we're out of service, open TCP sockets may still work
diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
index d1ae997..a2d3c5e 100644..100755
--- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
@@ -316,6 +316,11 @@ public class GSMPhone extends PhoneBase {
// we report data connected
ret = DataState.CONNECTED;
+ } else if (mSST == null) {
+ // Radio Technology Change is ongoning, dispose() and removeReferences() have
+ // already been called
+
+ ret = DataState.DISCONNECTED;
} else if (mSST.getCurrentGprsState()
!= ServiceState.STATE_IN_SERVICE) {
// If we're out of service, open TCP sockets may still work