summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2012-08-20 13:58:48 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-20 13:58:48 -0700
commit2ab323871c8a16e039df1ff916da57df7bd34763 (patch)
tree4470684fcbf3ab57e52a54fab4b5e232e7cd6cef /src/java
parent79dbf5616c72262355bb66bf1a2f70da5ceea015 (diff)
parent4eedbd9a3fa0bafb4be05522113a5f6498923b4e (diff)
downloadframeworks_opt_telephony-2ab323871c8a16e039df1ff916da57df7bd34763.zip
frameworks_opt_telephony-2ab323871c8a16e039df1ff916da57df7bd34763.tar.gz
frameworks_opt_telephony-2ab323871c8a16e039df1ff916da57df7bd34763.tar.bz2
am 4eedbd9a: am f0414167: Merge "Telephony: Fix LTE CB Sms for dual-mode devices"
* commit '4eedbd9a3fa0bafb4be05522113a5f6498923b4e': Telephony: Fix LTE CB Sms for dual-mode devices
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
index d6c2a20..9295773 100644
--- a/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
+++ b/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
@@ -393,9 +393,17 @@ public final class GsmSMSDispatcher extends SMSDispatcher {
SmsCbHeader header = new SmsCbHeader(receivedPdu);
String plmn = SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_NUMERIC);
- GsmCellLocation cellLocation = (GsmCellLocation) mPhone.getCellLocation();
- int lac = cellLocation.getLac();
- int cid = cellLocation.getCid();
+ int lac = -1;
+ int cid = -1;
+ android.telephony.CellLocation cl = mPhone.getCellLocation();
+ // Check if cell location is GsmCellLocation. This is required to support
+ // dual-mode devices such as CDMA/LTE devices that require support for
+ // both 3GPP and 3GPP2 format messages
+ if (cl instanceof GsmCellLocation) {
+ GsmCellLocation cellLocation = (GsmCellLocation)cl;
+ lac = cellLocation.getLac();
+ cid = cellLocation.getCid();
+ }
SmsCbLocation location;
switch (header.getGeographicalScope()) {