Android 9.0 系统framework发送悬浮通知的流程分析

1.前言


  在android9.0rom定制化开发中,在原生系统的systemui中,状态栏通知,和闹钟,wifi等悬浮通知也是很重要的,悬浮通知也是系统通知的一种,也是在frameworks中发送出来的通知,接下来就分析下9.0中的悬浮通知的发送流程,然后就可以实现自己自定义悬浮通知的相关功能的实现

2.系统framework发送悬浮通知的流程分析的核心类

frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

3.系统framework发送悬浮通知的流程分析的核心功能分析和实现

在系统systemui中的相关源码中,关于提醒式弹窗功能,主要是像wifi,闹钟,特殊的通知,通过查看SystemUI的代码,
发现在NotificationEntryManager.java负责显示 悬浮式 提醒式的通知管理首先看下提醒式弹窗的流程,然后分析怎么样屏蔽掉这些悬浮式通知


3.1 NotificationEntryManager.java中关于对悬浮通知相关流程的监听

/**
  * NotificationEntryManager is responsible for the adding, removing, and updating of 

猜你喜欢

转载自blog.csdn.net/baidu_41666295/article/details/130495526
今日推荐