diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-12-10 02:26:43 +0000 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-12-10 02:26:43 +0000 |
commit | db20c5e6ec931cfcc9efd4f9ec1983ab0036b187 (patch) | |
tree | 0450080c6c0e33d10af064c7294bbebd1cb2082d /src/java/com/android/internal/telephony/IccSmsInterfaceManagerProxy.java | |
parent | 553635e86c364c1126a1923316f6df488c4aed6c (diff) | |
download | android_frameworks_opt_telephony-db20c5e6ec931cfcc9efd4f9ec1983ab0036b187.tar.gz android_frameworks_opt_telephony-db20c5e6ec931cfcc9efd4f9ec1983ab0036b187.tar.bz2 android_frameworks_opt_telephony-db20c5e6ec931cfcc9efd4f9ec1983ab0036b187.zip |
IccSmsInterfaceManager: Don't intercept short-code premium messages
For both charging and potential timing factors on emergency and carrier
services, short codes should be delivered directly to the network.
Change-Id: If9d288048f9925573f8c5f2e51f0c2df789277bd
Diffstat (limited to 'src/java/com/android/internal/telephony/IccSmsInterfaceManagerProxy.java')
-rw-r--r-- | src/java/com/android/internal/telephony/IccSmsInterfaceManagerProxy.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/IccSmsInterfaceManagerProxy.java b/src/java/com/android/internal/telephony/IccSmsInterfaceManagerProxy.java index 43cacc8ee..8012880b9 100644 --- a/src/java/com/android/internal/telephony/IccSmsInterfaceManagerProxy.java +++ b/src/java/com/android/internal/telephony/IccSmsInterfaceManagerProxy.java @@ -186,6 +186,11 @@ public class IccSmsInterfaceManagerProxy extends ISms.Stub { mContext.enforceCallingPermission( android.Manifest.permission.SEND_SMS, "Sending SMS message"); + if (mIccSmsInterfaceManager.isShortSMSCode(destAddr)) { + mIccSmsInterfaceManager.sendText(callingPackage, destAddr, scAddr, text, + sentIntent, deliveryIntent); + return; + } ArrayList<String> parts = new ArrayList<String>(); parts.add(text); ArrayList<PendingIntent> sentIntents = new ArrayList<PendingIntent>(); @@ -203,6 +208,11 @@ public class IccSmsInterfaceManagerProxy extends ISms.Stub { mContext.enforceCallingPermission( android.Manifest.permission.SEND_SMS, "Sending SMS message"); + if (mIccSmsInterfaceManager.isShortSMSCode(destAddr)) { + mIccSmsInterfaceManager.sendMultipartText(callingPackage, destAddr, scAddr, + parts, sentIntents, deliveryIntents); + return; + } broadcastOutgoingSms(callingPackage, destAddr, scAddr, true, new ArrayList<String>(parts), new ArrayList<PendingIntent>(sentIntents), new ArrayList<PendingIntent>(deliveryIntents), -1); |