MTK 11A Shutdown

263 篇文章 2 订阅

Shutdown will be invoked for power-off request
– May from the power key of framework or the shutdown request of applications

Shutdown is responsible for
– Emit deinit events
– Play animation
– Deinit protocol
– Wait for asynchronous deinits of applications
– Send power off request

Note: For non-normal power-on(e.g. USB, alarm) or the case of srv_shutdown_exit_system() is called directly, shutdown application will not be launched

 

venusmmi/app/Cosmos/Shutdown   Application source code

 

VappShutdownApp itself only shows the shutdown animation
Applications register asynchronous deinit procedure in the flow control, they will be invoked during animation playing
– E.g. MMS, browser, call log

 

1.Block

Flow control
– When srv_shutdown_normal_start() is called, the flow control module takes over the execution
– Flow control uses framework procedure mechanism to handle the flow
– It controls the time of deinit events and exit system

Deinit protocol

Deinit protocol
– Registers a procedure in flow control
– Invoke shutdown service to deinit protocol

VappShutdownApp
– Used to play animation
– Creates VappAniPage for the animation page

 

2.Class

 

Flow control
– Uses framework procedure
– Shutdown itself or applications provide the interface of procedure and register in g_vapp_shutdown_main_flow[]

VappShutdownApp
– Creates VappAniPage to play animation


DEINIT_PROTOCOL
– Invoke shutdown service to deinit protocol asynchronously

 

DEINIT_APP
– First of all, invoke shutdown service to emit a DEINIT event to applications

ANIMATION
– Play shutdown animation
– At the same time, perform asynchronous deinits, such as protocol deinit, WAP deinit

DEINIT_PROTOCOL
– Detach network

Calls srv_shutdown_exit_system() to power off finally

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值