diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-12-11 17:22:30 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-12-11 17:22:30 +0700 |
commit | 844bb012c403ed4d9e06ad8ba9af0c6684ba5a51 (patch) | |
tree | 87d580033fdffa55550940944b6277661936aeae /src/java/com/android/internal/telephony/cat | |
parent | db939b01036f7d0ae8ad5c2726e3bac211b58add (diff) | |
download | frameworks_opt_telephony-844bb012c403ed4d9e06ad8ba9af0c6684ba5a51.zip frameworks_opt_telephony-844bb012c403ed4d9e06ad8ba9af0c6684ba5a51.tar.gz frameworks_opt_telephony-844bb012c403ed4d9e06ad8ba9af0c6684ba5a51.tar.bz2 |
Samsung STK: Fix SMS-based STK
SEND_SMS was falling through to SEND_USSD (which used to do nothing
until USSD support was added) causing an Exception because cmdParams
is not an instance of SendUSSDParams.
Fix by using type-checking instead of checking if Samsung STK is
enabled (because SendSMSParams and SendUSSDParams will only be
created if Samsung STK is enabled.)
Change-Id: I671014e295e9e529aad25a8b6fbd5a2e5788fc44
Diffstat (limited to 'src/java/com/android/internal/telephony/cat')
-rw-r--r-- | src/java/com/android/internal/telephony/cat/CatService.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/java/com/android/internal/telephony/cat/CatService.java b/src/java/com/android/internal/telephony/cat/CatService.java index 156c977..8ae5fea 100644 --- a/src/java/com/android/internal/telephony/cat/CatService.java +++ b/src/java/com/android/internal/telephony/cat/CatService.java @@ -287,15 +287,15 @@ public class CatService extends Handler implements AppInterface { break; case SEND_DTMF: case SEND_SMS: - if (mContext.getResources(). - getBoolean(com.android.internal.R.bool.config_samsung_stk)) { + // Samsung STK + if (cmdParams instanceof SendSMSParams) { handleProactiveCommandSendSMS((SendSMSParams) cmdParams); } // Fall through case SEND_SS: case SEND_USSD: - if (mContext.getResources(). - getBoolean(com.android.internal.R.bool.config_samsung_stk)) { + // Samsung STK + if (cmdParams instanceof SendUSSDParams) { handleProactiveCommandSendUSSD((SendUSSDParams) cmdParams); } |