broadcast
2020-03-17 17:52:42 0 举报
Broadcast发送流程
作者其他创作
大纲/内容
processNextBroadcastLocked
将广播转发给各目标广播接收者处理将mParallelBroadcasts队列中的广播直接发送给它的接收者处理mOrderedBroadcasts队列中动态注册的有序广播直接发送给它的接收者处理mOrderedBroadcasts队列中的静态注册的广播接收者,判断权限,若程序没有启动先启动,然后再发送给它的接收者处理
performReceive
BroadcastHandler
handleMessage
AMS找到参数intent所描述广播的目标广播接收者分别保存到mParallelBroadcasts和mOrderedBroadcasts队列中
scheduleReceiver
sendMessage
LoadedApk
BroadcastReceiver
broadcastIntent
ActivityManagerService
onReceive
performReceiveLocked
无序广播调度队列mParallelBroadcasts(包括动态注册的无序广播接收者)有序广播调度队列mOrderedBroadcasts(包括动态注册的有序广播接收者和所有静态注册的广播接收者)
H
processNextBroadcast
Context
sendBroadcast(intent)
broadcastIntentLocked
this.mBase.sendBroadcast(intent)
handleReceiver
动态注册的广播权限检查
ActivityThread
ContextWrapper
发送消息BROADCAST_INTENT_MSG
deliverToRegisteredReceiverLocked
scheduleBroadcastsLocked
静态注册的广播发送流程
ContextImpl
scheduleRegisteredReceiver
动态注册的广播发送流程
processCurBroadcastLocked
BroadcastQueue
收藏
收藏
0 条评论
下一页