diff options
author | Wink Saville <> | 2009-04-02 01:37:02 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-02 01:37:02 -0700 |
commit | 767a662ecde33c3979bf02b793d392aca0403162 (patch) | |
tree | f55548c33a8267c39acc60f72051f9856e95e672 /location | |
parent | e9c08056fafab720856ab8516ea0e623a5c0e360 (diff) | |
download | frameworks_base-767a662ecde33c3979bf02b793d392aca0403162.zip frameworks_base-767a662ecde33c3979bf02b793d392aca0403162.tar.gz frameworks_base-767a662ecde33c3979bf02b793d392aca0403162.tar.bz2 |
AI 144185: Integrate cdma into the main code base.
Automated import of CL 144185
Diffstat (limited to 'location')
-rw-r--r-- | location/java/com/android/internal/location/CellState.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/location/java/com/android/internal/location/CellState.java b/location/java/com/android/internal/location/CellState.java index eb6535e..ad89f85 100644 --- a/location/java/com/android/internal/location/CellState.java +++ b/location/java/com/android/internal/location/CellState.java @@ -60,9 +60,11 @@ public class CellState { } public CellState(TelephonyManager telephonyManager, CellLocation location, int signalStrength) { - GsmCellLocation loc = (GsmCellLocation)location; - mLac = loc.getLac(); // example: 6032 - mCid = loc.getCid(); // example: 31792 + if (location instanceof GsmCellLocation) { + GsmCellLocation loc = (GsmCellLocation)location; + mLac = loc.getLac(); // example: 6032 + mCid = loc.getCid(); // example: 31792 + } mTime = System.currentTimeMillis(); // Get radio type @@ -72,6 +74,11 @@ public class CellState { mRadioType = RADIO_TYPE_GPRS; } else if (radioType == TelephonyManager.NETWORK_TYPE_UMTS) { mRadioType = RADIO_TYPE_WCDMA; + } else if (radioType == TelephonyManager.NETWORK_TYPE_CDMA || + radioType == TelephonyManager.NETWORK_TYPE_EVDO_0 || + radioType == TelephonyManager.NETWORK_TYPE_EVDO_A || + radioType == TelephonyManager.NETWORK_TYPE_1xRTT) { + mRadioType = RADIO_TYPE_CDMA; } // Get neighboring cells @@ -290,3 +297,4 @@ public class CellState { } } } + |