summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorMike Lockwood <>2009-04-05 14:15:41 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-05 14:15:41 -0700
commitb9db7c9f5a8924361ae2f439509e19993d82b884 (patch)
tree99cc2b39b7739b3b900e7e753b75767670f930a5 /telephony
parentc23031933ff785c9edd50ccec7577f8a728e8b8f (diff)
downloadframeworks_base-b9db7c9f5a8924361ae2f439509e19993d82b884.zip
frameworks_base-b9db7c9f5a8924361ae2f439509e19993d82b884.tar.gz
frameworks_base-b9db7c9f5a8924361ae2f439509e19993d82b884.tar.bz2
AI 144593: Fix GSM cell location updates.
BUG=1761611 Automated import of CL 144593
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/CellLocation.java4
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/CellLocation.java b/telephony/java/android/telephony/CellLocation.java
index dd98608..bb5f126 100644
--- a/telephony/java/android/telephony/CellLocation.java
+++ b/telephony/java/android/telephony/CellLocation.java
@@ -68,7 +68,7 @@ public abstract class CellLocation {
// NOTE here TelephonyManager.getDefault().getPhoneType() cannot be used since at startup
// ITelephony have not been created
if (RILConstants.CDMA_PHONE ==
- SystemProperties.getInt(Settings.Secure.CURRENT_ACTIVE_PHONE, 0)) {
+ SystemProperties.getInt(Settings.Secure.CURRENT_ACTIVE_PHONE, RILConstants.GSM_PHONE)) {
return new CdmaCellLocation(bundle);
} else {
return new GsmCellLocation(bundle);
@@ -91,7 +91,7 @@ public abstract class CellLocation {
// NOTE here TelephonyManager.getDefault().getPhoneType() cannot be used since at startup
// ITelephony have not been created
if (RILConstants.CDMA_PHONE ==
- SystemProperties.getInt(Settings.Secure.CURRENT_ACTIVE_PHONE, 0)) {
+ SystemProperties.getInt(Settings.Secure.CURRENT_ACTIVE_PHONE, RILConstants.GSM_PHONE)) {
return new CdmaCellLocation();
} else {
return new GsmCellLocation();
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index 3c0b603..8ecf245 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -383,7 +383,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
String states[] = (String[])ar.result;
int lac = -1;
int cid = -1;
- if (states.length == 3) {
+ if (states.length >= 3) {
try {
if (states[1] != null && states[1].length() > 0) {
lac = Integer.parseInt(states[1], 16);
@@ -629,7 +629,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
if (states.length > 0) {
try {
regState = Integer.parseInt(states[0]);
- if (states.length == 3) {
+ if (states.length >= 3) {
if (states[1] != null && states[1].length() > 0) {
lac = Integer.parseInt(states[1], 16);
}