summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2012-08-20 13:57:47 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-20 13:57:47 -0700
commit4eedbd9a3fa0bafb4be05522113a5f6498923b4e (patch)
treefe84787939c9ce2e0c4ceb40138ed101b25ed923 /src/java
parent342f21b85d51d4216192a4e8b9fe6d6706b9bb3e (diff)
parentf0414167059ea8ac7daae752e0ce7bd858df7f92 (diff)
downloadframeworks_opt_telephony-4eedbd9a3fa0bafb4be05522113a5f6498923b4e.zip
frameworks_opt_telephony-4eedbd9a3fa0bafb4be05522113a5f6498923b4e.tar.gz
frameworks_opt_telephony-4eedbd9a3fa0bafb4be05522113a5f6498923b4e.tar.bz2
am f0414167: Merge "Telephony: Fix LTE CB Sms for dual-mode devices"
* commit 'f0414167059ea8ac7daae752e0ce7bd858df7f92': 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()) {