Loading src/java/com/android/internal/telephony/cat/CatService.java +19 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.Resources.NotFoundException; import android.os.AsyncResult; import android.os.Handler; import android.os.HandlerThread; Loading Loading @@ -293,12 +294,28 @@ public class CatService extends Handler implements AppInterface { case RECEIVE_DATA: case SEND_DATA: BIPClientParams cmd = (BIPClientParams) cmdParams; if (cmd.mHasAlphaId && (cmd.mTextMsg.text == null)) { /* Per 3GPP specification 102.223, * if the alpha identifier is not provided by the UICC, * the terminal MAY give information to the user * noAlphaUsrCnf defines if you need to show user confirmation or not */ boolean noAlphaUsrCnf = false; try { noAlphaUsrCnf = mContext.getResources().getBoolean( com.android.internal.R.bool.config_stkNoAlphaUsrCnf); } catch (NotFoundException e) { noAlphaUsrCnf = false; } if ((cmd.mTextMsg.text == null) && (cmd.mHasAlphaId || noAlphaUsrCnf)) { CatLog.d(this, "cmd " + cmdParams.getCommandType() + " with null alpha id"); // If alpha length is zero, we just respond with OK. if (isProactiveCmd) { if (cmdParams.getCommandType() == CommandType.OPEN_CHANNEL) { mCmdIf.handleCallSetupRequestFromSim(true, null); } else { sendTerminalResponse(cmdParams.mCmdDet, ResultCode.OK, false, 0, null); } } return; } // Respond with permanent failure to avoid retry if STK app is not present. Loading src/java/com/android/internal/telephony/cat/ValueParser.java +17 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import com.android.internal.telephony.GsmAlphabet; import com.android.internal.telephony.cat.Duration.TimeUnit; import com.android.internal.telephony.uicc.IccUtils; import android.content.res.Resources; import android.content.res.Resources.NotFoundException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; Loading Loading @@ -285,10 +287,24 @@ abstract class ValueParser { throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD); } } else { CatLog.d("ValueParser", "Alpha Id length=" + length); return null; } } else { return CatService.STK_DEFAULT; /* Per 3GPP specification 102.223, * if the alpha identifier is not provided by the UICC, * the terminal MAY give information to the user * noAlphaUsrCnf defines if you need to show user confirmation or not */ boolean noAlphaUsrCnf = false; Resources resource = Resources.getSystem(); try { noAlphaUsrCnf = resource.getBoolean( com.android.internal.R.bool.config_stkNoAlphaUsrCnf); } catch (NotFoundException e) { noAlphaUsrCnf = false; } return (noAlphaUsrCnf ? null : CatService.STK_DEFAULT); } } Loading Loading
src/java/com/android/internal/telephony/cat/CatService.java +19 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.content.res.Resources.NotFoundException; import android.os.AsyncResult; import android.os.Handler; import android.os.HandlerThread; Loading Loading @@ -293,12 +294,28 @@ public class CatService extends Handler implements AppInterface { case RECEIVE_DATA: case SEND_DATA: BIPClientParams cmd = (BIPClientParams) cmdParams; if (cmd.mHasAlphaId && (cmd.mTextMsg.text == null)) { /* Per 3GPP specification 102.223, * if the alpha identifier is not provided by the UICC, * the terminal MAY give information to the user * noAlphaUsrCnf defines if you need to show user confirmation or not */ boolean noAlphaUsrCnf = false; try { noAlphaUsrCnf = mContext.getResources().getBoolean( com.android.internal.R.bool.config_stkNoAlphaUsrCnf); } catch (NotFoundException e) { noAlphaUsrCnf = false; } if ((cmd.mTextMsg.text == null) && (cmd.mHasAlphaId || noAlphaUsrCnf)) { CatLog.d(this, "cmd " + cmdParams.getCommandType() + " with null alpha id"); // If alpha length is zero, we just respond with OK. if (isProactiveCmd) { if (cmdParams.getCommandType() == CommandType.OPEN_CHANNEL) { mCmdIf.handleCallSetupRequestFromSim(true, null); } else { sendTerminalResponse(cmdParams.mCmdDet, ResultCode.OK, false, 0, null); } } return; } // Respond with permanent failure to avoid retry if STK app is not present. Loading
src/java/com/android/internal/telephony/cat/ValueParser.java +17 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import com.android.internal.telephony.GsmAlphabet; import com.android.internal.telephony.cat.Duration.TimeUnit; import com.android.internal.telephony.uicc.IccUtils; import android.content.res.Resources; import android.content.res.Resources.NotFoundException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; Loading Loading @@ -285,10 +287,24 @@ abstract class ValueParser { throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD); } } else { CatLog.d("ValueParser", "Alpha Id length=" + length); return null; } } else { return CatService.STK_DEFAULT; /* Per 3GPP specification 102.223, * if the alpha identifier is not provided by the UICC, * the terminal MAY give information to the user * noAlphaUsrCnf defines if you need to show user confirmation or not */ boolean noAlphaUsrCnf = false; Resources resource = Resources.getSystem(); try { noAlphaUsrCnf = resource.getBoolean( com.android.internal.R.bool.config_stkNoAlphaUsrCnf); } catch (NotFoundException e) { noAlphaUsrCnf = false; } return (noAlphaUsrCnf ? null : CatService.STK_DEFAULT); } } Loading