Giter VIP home page Giter VIP logo

gaia's People

Watchers

 avatar  avatar  avatar

gaia's Issues

Show "loading" when doing menu selction

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.

backward move cannot work in depth 1

STR:

  1. Goto STK Menu in Settings

MENU

1st item
2nd item
....

Select first item( or any item)
now we are in the menu's flow of depth 1

< 1st Item

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:

< 1st Item

1A
1B

Expect: display root menu items

MENU

1st item
2nd item
....

cannot display items from proactive command : SELECT_ITEM

Now the SIM apps will do

  1. send Proactive Command : SET UP MENU
  2. Session end
  3. send Proactive Command : SELECT ITEM
    (In this SIM apps, SELECT ITEM will come by itself, without user needs to call sendStkMenuSelection)

but on Gaia UI side,
the UI still displays content from SET UP MENU,
it didn't show the latest content from SELECT ITEM

check confirmMessage in SET UP CALL

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.

Cache support

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.

typo "identifer"

There some typos in icc.js
"identifier" -> ends with FER

it should be "identifier" -> FIER

Add 'backward move'

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 command is null when calling sendStkResponse

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.

add input length restriction in GET_INPUT

When the proactive command is GET_INPUT
command.options is MozStkInput
it has minLength and maxLength members,
so STK UI needs to do

  1. show the available length of input to user according min and max length. For example, when minLength is 1, maxLength is 160, STK UI should show (1~160) on the input dialog.
  2. If user doesn't input the appropriate length of input, for example, doesn't type any characters (length 0), or input too much ( more than 160 characters) , the "OK" button should be disable/
  3. One nit for UI is to make input text field larger.

Use different type of dialogs to DISPLAY TEXT

In DISPLAY TEXT,
there are 4 types of messages

  1. isHighPriority : STK UI should try to display this message to the top visible layer
  2. responseNeeded: Need immediately response
    3 . userClear is true : Need to wait for user to input
  3. userClear is false, show this message, dismiss the dialog after a delay

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.

don't sendStkResponse immediately for DISPLAY_TEXT

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

STK Events and Cache in background

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.

Add a timeout to show message from DISPLAY TEXT

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 getting session end event, UI should back to root

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.

Implement stksessionend handler

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.