栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Notifications通知到SystemUI(“Notifications 通知”拆解)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Notifications通知到SystemUI(“Notifications 通知”拆解)

Notifications通知到SystemUI(“Notifications 通知”拆解)

android12-release

APP请求系统通知(“Notifications 通知”拆解)
SystemUI启动,及其SystemUIService启动


SystemUIService中StatusBar注册NotificationListener

com.android.systemui.statusbar.phone.StatusBar

SystemUI传递过来的Context
frameworks/base/core/java/android/service/notification/NotificationListenerService.java

mSystemContext = context : SystemUI传递过来的ContextgetNotificationInterface获取NotificationListenerService接口代理,经过binder调用mHandler = new MyHandler(context.getMainLooper()) 这个MyHandler运行在SystemUI进程noMan.registerListener向system_server进程中的NotificationListenerService注册监听器;APP请求系统通知(“Notifications 通知”拆解) 是NotificationListenerWrapper.onNotificationPosted过程是运行在SystemUI进程(即调用NotificationListenerService中NotificationListenerWrapper实例对象的onNotificationPosted())
NotificationEntryManager.java:SystemUI显示/更新Notification

APP请求系统通知(“Notifications 通知”拆解)通知到SystemUI监听
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java

frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java中注册

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/712127.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号