diff options
Diffstat (limited to 'src/java/com/android/internal/telephony/cat/CommandParamsFactory.java')
-rwxr-xr-x | src/java/com/android/internal/telephony/cat/CommandParamsFactory.java | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java b/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java index 93525cd90..103847d7b 100755 --- a/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java +++ b/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java @@ -16,6 +16,7 @@ package com.android.internal.telephony.cat; +import android.content.res.Resources; import android.graphics.Bitmap; import android.os.Handler; import android.os.Message; @@ -701,7 +702,49 @@ class CommandParamsFactory extends Handler { } textMsg.responseNeeded = false; - mCmdParams = new DisplayTextParams(cmdDet, textMsg); + // Samsung STK + if (Resources.getSystem().getBoolean(com.android.internal.R.bool.config_samsung_stk)) { + AppInterface.CommandType cmdType = AppInterface.CommandType.fromInt(cmdDet.typeOfCommand); + if (cmdType == AppInterface.CommandType.SEND_SMS) { + String smscAddress = null; + String pdu = null; + + ctlv = searchForTag(ComprehensionTlvTag.ADDRESS, ctlvs); + if (ctlv != null) { + smscAddress = ValueParser.retrieveSMSCaddress(ctlv); + CatLog.d(this, "The smsc address is " + smscAddress); + } + else { + CatLog.d(this, "The smsc address is null"); + } + + ctlv = searchForTag(ComprehensionTlvTag.SMS_TPDU, ctlvs); + if (ctlv != null) { + pdu = ValueParser.retrieveSMSTPDU(ctlv); + CatLog.d(this, "The SMS tpdu is " + pdu); + } + else { + CatLog.d(this, "The SMS tpdu is null"); + } + mCmdParams = new SendSMSParams(cmdDet, textMsg, smscAddress, pdu); + } else if (cmdType == AppInterface.CommandType.SEND_USSD) { + String ussdString = null; + + ctlv = searchForTag(ComprehensionTlvTag.USSD_STRING, ctlvs); + if (ctlv != null) { + ussdString = ValueParser.retrieveUSSDString(ctlv); + CatLog.d(this, "The ussd string is " + ussdString); + } + else { + CatLog.d(this, "The ussd string is null"); + } + mCmdParams = new SendUSSDParams(cmdDet, textMsg, ussdString); + } else { + mCmdParams = new DisplayTextParams(cmdDet, textMsg); + } + } else { + mCmdParams = new DisplayTextParams(cmdDet, textMsg); + } if (iconId != null) { mloadIcon = true; |