B2G STK: Move STK code out of ril_worker.js

RESOLVED WONTFIX

Status

Firefox OS
RIL
RESOLVED WONTFIX
5 years ago
a year ago

People

(Reporter: allstars, Unassigned)

Tracking

unspecified
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:-)

Details

Attachments

(3 attachments, 1 obsolete attachment)

We should move STK code in ril_worker to another file, called ril_stk.js... etc.

Updated

5 years ago
Assignee: nobody → gwang

Comment 1

5 years ago
Created attachment 825786 [details] [diff] [review]
Part1:  Move stk code to ril_worker_stk.js

Comment 2

5 years ago
Created attachment 825787 [details] [diff] [review]
Part2: modify stk xpcshell test.

Comment 3

5 years ago
Created attachment 825788 [details] [diff] [review]
Part3: add code quality test stk in marionette.

Comment 4

5 years ago
Created attachment 825808 [details] [diff] [review]
Part1:  Move stk code to ril_worker_stk.js
Attachment #825786 - Attachment is obsolete: true
Comment on attachment 825808 [details] [diff] [review]
Part1:  Move stk code to ril_worker_stk.js

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

::: dom/system/gonk/ril_worker_stk.js
@@ +23,5 @@
> +  stkHandleCallSetup: function stkHandleCallSetup(options) {
> +     Buf.newParcel(REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM);
> +     Buf.writeInt32(1);
> +     Buf.writeInt32(options.hasConfirmed ? 1 : 0);
> +     Buf.sendParcel();

In this file, Buf, GsmPDUHelper, and RIL are actually from the worker.

You might also think the dependency here.

Comment 7

5 years ago
(In reply to Yoshi Huang[:allstars.chh][:yoshi] from comment #5)
> Comment on attachment 825808 [details] [diff] [review]
> Part1:  Move stk code to ril_worker_stk.js
> 
> Review of attachment 825808 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/system/gonk/ril_worker_stk.js
> @@ +23,5 @@
> > +  stkHandleCallSetup: function stkHandleCallSetup(options) {
> > +     Buf.newParcel(REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM);
> > +     Buf.writeInt32(1);
> > +     Buf.writeInt32(options.hasConfirmed ? 1 : 0);
> > +     Buf.sendParcel();
> 
> In this file, Buf, GsmPDUHelper, and RIL are actually from the worker.
> 
> You might also think the dependency here.

The modify is base on Bug 811754's attachment.
I'm trying to make ril_worker.js more clear, just leave:

Four function handler in RIL.
(In order to handle RIL function call from RadioInterfaceLayer)
>
sendStkTerminalResponse: function sendStkTerminalResponse(response) {   
  STK.sendStkTerminalResponse(response);                                    
},                                                                                      
sendStkMenuSelection: function sendStkMenuSelection(command) {         
  STK.sendStkMenuSelection(command);                                       
},                                                                                                                    
sendStkTimerExpiration: function sendStkTimerExpiration(command) {          
  STK.sendStkTimerExpiration(command);                                       
},                                                                                              
sendStkEventDownload: function sendStkEventDownload(command) {              
  STK.sendStkEventDownload(command);                
},

Four ril request and unsolicited command redirection.
RIL[REQUEST_STK_SEND_ENVELOPE_WITH_STATUS] = STK[REQUEST_STK_SEND_ENVELOPE_WITH_STATUS].bind(STK);
RIL[UNSOLICITED_STK_SESSION_END] = STK[UNSOLICITED_STK_SESSION_END].bind(STK);
RIL[UNSOLICITED_STK_PROACTIVE_COMMAND] = STK[UNSOLICITED_STK_PROACTIVE_COMMAND].bind(STK);
RIL[UNSOLICITED_STK_EVENT_NOTIFY] = STK[UNSOLICITED_STK_EVENT_NOTIFY].bind(STK);

Other stk related function are moved into STK.

Buf, GsmPDUHelper and few RIL function are also used in "StkProactiveCmdHelper and StkCommandParamsFactory" 
So I think they are more like utilities function, should be reasonable to separate them.

Updated

5 years ago
Assignee: gwang → nobody

Comment 8

4 years ago
Add this in backlog.
blocking-b2g: --- → backlog
blocking-b2g: backlog → -
(Reporter)

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.