B2G STK: refactor the TLV size handler in sendStkTerminalResponse

RESOLVED FIXED in Firefox 20

Status

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: edgar, Assigned: edgar)

Tracking

unspecified
B2G C3 (12dec-1jan)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:shira+, firefox19 wontfix, firefox20 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

Details

(Whiteboard: QARegressExclude)

Attachments

(1 attachment, 1 obsolete attachment)

Please check the bug 804667 comment #20.

::: dom/system/gonk/ril_worker.js
@@ +3178,5 @@
> +      let timer = response.timer;
> +      size = size +
> +             ((timer.timerId ? TLV_TIMER_IDENTIFIER : 0) +
> +              (timer.timerValue ? TLV_TIMER_VALUE : 0)) * 2;
> +    }

Maybe we could do as sendICCEnvelopeCommand,
so we don't have to do '* 2' each time when we add a new TLV.
Attachment #695100 - Flags: review?(allstars.chh)
Comment on attachment 695100 [details] [diff] [review]
Refactor the TLV size handler in sendStkTerminalResponse, v1

Review of attachment 695100 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/ril_worker.js
@@ +3395,3 @@
>      if (response.localInfo) {
>        let localInfo = response.localInfo;
> +      berLen = berLen +

seems += is easier

@@ +3406,1 @@
>      }

Add an extra line here.

@@ +3406,4 @@
>      }
>      if (response.timer) {
>        let timer = response.timer;
> +      berLen = berLen +

ditto

@@ +3407,5 @@
>      if (response.timer) {
>        let timer = response.timer;
> +      berLen = berLen +
> +               (timer.timerId ? TLV_TIMER_IDENTIFIER : 0) +
> +               (timer.timerValue ? TLV_TIMER_VALUE : 0);

Can any one of these two be optional?
seems 
berLen += TLV_TIMER_SIZE;
should do the work.

where TLV_TIMER_SIZE is TLV_TIMER_IDENTFIER + TLV_TIMER_VAUE
Attachment #695100 - Flags: review?(allstars.chh) → review+
Comment on attachment 695100 [details] [diff] [review]
Refactor the TLV size handler in sendStkTerminalResponse, v1

Review of attachment 695100 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/ril_worker.js
@@ +3407,5 @@
>      if (response.timer) {
>        let timer = response.timer;
> +      berLen = berLen +
> +               (timer.timerId ? TLV_TIMER_IDENTIFIER : 0) +
> +               (timer.timerValue ? TLV_TIMER_VALUE : 0);

timerValue is optional.

For below two action, it needs pass timer value to UICC.
 - STK_TIMER_DEACTIVE
 - STK_TIMER_GET_CURRENT_VALUE

But STK_TIMER_START needs not.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/995041ffb42d
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
blocking-b2g: --- → shira+
Please merge bug 804667 into b2g18 first then this, or may have conflict.
Not sure how I can verify this...  Is there some way to easily verify this?
Hi, Naoki
This patch is refactoring about the PDU format for STK.
So if this patch works, you can navigator through STK menu successfully. 

Step: Go into Sim Toolkit Menu, and select some item, if some sub-menu pop up, then it's success.
Whiteboard: QARegressExclude
Cannot verify, don't have access to SIM Toolkit.
You need to log in before you can comment on or make changes to this bug.