BREW App State Transition based BREW3.1.x

来源:互联网 发布:require.js 编辑:程序博客网 时间:2024/05/22 10:34

 

app state transition

 

 

Related Explain as below:

1

Code:

APPSTATE_STOPPED -> APPSTATE_STARTING

Request for app to start. If app can be started then, 2or 3-based on

whether it has to be started in FG or BG.



2.1 and 2.2

Code:

APPSTATE_STARTING -> APPSTATE_TOP_VISIBLE orAPPSTATE_BACKGROUND

Based on whether it has to be started in FG or BG.

2.1 Send EVT_APP_START

2.2 Send EVT_APP_START_BACKGROUND

 

 

 

 

 

3.1

Code:

APPSTATE_TOP_VISIBLE -> APPSTATE_SUSPENDED

On EVT_APP_SUSPEND


3.2

Code:

APPSTATE_SUSPENDED -> APPSTATE_TOP_VISIBLE

On EVT_APP_RESUME


4.1

Code:

APPSTATE_TOP_VISIBLE -> APPSTATE_BACKGROUND

On EVT_APP_STOP, set dwParam to FALSE. The top-visibleapplication can force

the EVT_APP_STOP event by calling ISHELL_CloseApplet() onitself.


4.2

Code:

APPSTATE_BACKGROUND -> APPSTATE_TOP_VISIBLE

Any background application may return to the foregroundby calling

ISHELL_StartApplet() on itself, which will make ittop-visible.


5

Code:

APPSTATE_BACKGROUND   }

APPSTATE_TOP_VISIBLE  } -> APPSTATE_CLOSING

APPSTATE_SUSPENDED    }

On EVT_APP_STOP event.Can come when

 - BREW closes theapplication on shutdown

 - CallISHELL_CloseApplet() with the clsid of the app.

Code:

APPSTATE_CLOSING -> APPSTATE_STOPPED

App closed and item removed from history