Bug 1117658 - Part 1: Provide Duration TLV in TR for "USAT case 27.22.4.2.8 GET INKEY SEQ 8.1 GET INKEY". r=echen

This commit is contained in:
Bevis Tseng 2015-01-20 18:04:01 +08:00
Родитель 2f5aef982e
Коммит 4782b0a6fe
1 изменённых файлов: 19 добавлений и 1 удалений

Просмотреть файл

@ -2954,7 +2954,7 @@ RilObject.prototype = {
GsmPDUHelper.writeHexOctet(COMPREHENSIONTLV_TAG_COMMAND_DETAILS |
COMPREHENSIONTLV_FLAG_CR);
GsmPDUHelper.writeHexOctet(3);
if (response.command) {
if (command) {
GsmPDUHelper.writeHexOctet(command.commandNumber);
GsmPDUHelper.writeHexOctet(command.typeOfCommand);
GsmPDUHelper.writeHexOctet(command.commandQualifier);
@ -3035,6 +3035,24 @@ RilObject.prototype = {
}
}
// Duration
if (response.resultCode === STK_RESULT_NO_RESPONSE_FROM_USER) {
// In TS102 223, 6.4.2 GET INKEY, "if the UICC requests a variable timeout,
// the terminal shall wait until either the user enters a single character
// or the timeout expires. The timer starts when the text is displayed on
// the screen and stops when the TERMINAL RESPONSE is sent. The terminal
// shall pass the total display text duration (command execution duration)
// to the UICC using the TERMINAL RESPONSE. The time unit of the response
// is identical to the time unit of the requested variable timeout."
let duration = command && command.options && command.options.duration;
if (duration) {
GsmPDUHelper.writeHexOctet(COMPREHENSIONTLV_TAG_DURATION);
GsmPDUHelper.writeHexOctet(2);
GsmPDUHelper.writeHexOctet(duration.timeUnit);
GsmPDUHelper.writeHexOctet(duration.timeInterval);
}
}
// Local Information
if (response.localInfo) {
let localInfo = response.localInfo;