frsela / gaia Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mozilla-b2g/gaia
Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project
Home Page: https://wiki.mozilla.org/B2G
License: Other
This project forked from mozilla-b2g/gaia
Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project
Home Page: https://wiki.mozilla.org/B2G
License: Other
When doing menu selection with "sendStkMenuSelection"
sometimes it will take a while to wait for SIM returns the items,
at this time STK UI should show a loading UI to user to indicate that ME is still waiting for SIM's response.
On the partners' SIM app,
"Select Item" proactive command will be sent to ME first , even without calling sendStkMenuSelection.
We need to display the contents of this "Select Item" to user, event user hasn't selected "SIM Toolkit" .
STR:
1st item
2nd item
....
Select first item( or any item)
now we are in the menu's flow of depth 1
1A
1B
Then choose back ( press the '<' icon )
now we will receive stksessionend
(since in the root, we need to call setStkMenuSelection)
but UI still displays content from depth 1
Result:
1A
1B
Expect: display root menu items
1st item
2nd item
....
Now the SIM apps will do
but on Gaia UI side,
the UI still displays content from SET UP MENU,
it didn't show the latest content from SELECT ITEM
As in Bug 791935, we need to notify MT Call, Call Connected and Call disconnected event to ICC.
As in #1, ICC will send a list of events to ME.
one of this event list is STK_EVENT_TYPE_LOCATION_STATUS.
So when location info is updated, ME needs to notify the event to ICC accordingly.
Also see https://bugzilla.mozilla.org/show_bug.cgi?id=790547
and Spec TS 11.14, clause 11.4
In SET UP CALL, the command.options will be MozStkSetUpCall.
And in MozStkSetUpCall, except address, other members are NOT mandatory.
So in STK UI, it needs to check if confirmMessage/callMessage is defined or not.
In Bug 790543, (which is still under super-review)
icc will send a proactive command 'SET UP EVENT LIST" to ME,
and in this message, the options in stk command will be MozStkSetUpEventList,
it contains an array of event list needed to be monitored.
Also see TS 11.14, clause .4.16
In bugzilla we decided to cache the main menu in Gaia (https://bugzilla.mozilla.org/show_bug.cgi?id=792751)
This had been implemented in:
05c2522
and:
8a2c726
Anyway, the first icc-stkcommand SystemMessage is lost (I suppose because the app is not fully loaded)
The co-lateral effect is that the ICC didn't got the correct response and you need to wait near 4 minutes to receive the second message from the ICC which is correctly mapped. Meanwhile you see the list of apps but you cann't use it since the ICC don't response to commands.
As implemented Bug 793137, we need to support "Play Tone"
There some typos in icc.js
"identifier" -> ends with FER
it should be "identifier" -> FIER
In STK menu,
after selecting the items several times,
sometimes we want to go back to last page,
so there should be an UI to handle this.
For the implementation,
you need to use icc.STK_RESULT_BACKWARD_MOVE_BY_USER in the resultCode of MozStkResponse.
Sometimes i found when calling sendStkResponse, the command argument is null.
E/GeckoConsole( 254): Content JS LOG at app://settings.gaiamobile.org/js/icc.js:13 in debug: [DEBUG] STKUI: sendStkResponse to command: null # response = {"resultCode":0,"itemIdentifier":"1"}
This seems to be caused by calling two consecutively sendStkResponse, i.e. select the menu item twice very quickly,
at lease there should be race-condition when setting iccLastCommand.
When the proactive command is GET_INPUT
command.options is MozStkInput
it has minLength and maxLength members,
so STK UI needs to do
In DISPLAY TEXT,
there are 4 types of messages
I think we need to distinguish the dialogs when userClear is true or false, since one expects input from user, and the other one can be dismissed by itself after a delay.
For proactive command:DISPLAY_TEXT
we will pop up a dialog to inform user to message,
but we need to send StkResponse until user reads this text message
otherwise in some cases, user might not get all the notifications
For example , ICC will send many DISPLAY_TEXT proactive commands
but user might not aware this , or he only knows the last one
Now, when the STK App receives unsolicited messages it starts the settings app and is showed in the app. list.
This should work transparently as a service.
For proactive command, DISPLAY TEXT
there is a member called "userClear",
From TS 11.14, 12.16,
when userClear is false,
then STK UI should use a delay(timeout) to display the text,
otherwise, we should wait for user to clear the message.
For example,
when a DISPLAY TEXT command is received from SIM,
(check [1] first!)
we could use a timeout to display it,
when the timeout is expired,
STK UI can send a sendStkResponse with STK_RESULT_OK in it, ( see [2] for special case)
so user can sit there and wait the operation finished, without having to press "OK" every time.
, and if user has pressed "OK" before the timeout, STK UI should also cancel the timeout.
[1] in DISPLAY TEXT, there is a member called responseNeeded, if this member is true, STK UI should reply sendStkResponse *immediately" without waiting for user nor timeout.
[2] In DISPLAY TEXT, there is a member called userClear, so when the timeout expires, STK UI should response with STK_RESULT_NO_RESPONSE_FROM_USER in sendStkResponse.
After some interactions with SIM apps,
finally gaia will get stk-sessionend event,
but it seems UI still displays items from last session.
When gaia got session-end,
Gaia should go back to the root menu,
so next time, user can choose the items in root menu,
and start the session with sendStkMenuSelection.
in nsIDOMIccManager, there's a event handler called 'onstksessionend'
when this stksessionend event has been notified, it means this ICC session has been terminated by ICC. So the gaia needs to reset the UI to its initial state, i.e. showing menu items from SET_UP_MENU.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.