diff options
author | Alex Yakavenka <ayakaven@codeaurora.org> | 2012-08-14 16:29:29 -0700 |
---|---|---|
committer | Rika Brooks <rbrooks@codeaurora.org> | 2012-08-20 11:08:28 -0700 |
commit | 0fd49b6b31960a768702d202a066b1088ec489a1 (patch) | |
tree | 1f180ad202abe71e97d97b4829fba512a32855de /src | |
parent | 801aa9f327730327132aafbae7e0c55bb6e7ea71 (diff) | |
download | frameworks_opt_telephony-0fd49b6b31960a768702d202a066b1088ec489a1.zip frameworks_opt_telephony-0fd49b6b31960a768702d202a066b1088ec489a1.tar.gz frameworks_opt_telephony-0fd49b6b31960a768702d202a066b1088ec489a1.tar.bz2 |
Telephony: Fix LTE CB Sms for dual-mode devices
Ignore 3gpp location information when it is not available.
This is required to support dual-mode devices such as CDMA/LTE devices
that require support for both 3GPP and 3GPP2 format messages.
Change-Id: Ie5d6372ef7e8da6893800e05a83ba840b7fd31f6
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java | 14 |
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()) { |