在10.0SystemUI 中有一些 高级别的通知 发出的时候 会首选悬浮在状态栏 上面 几秒钟消失 并且还会有 通知提示音 ,根据需求要求去掉悬浮通知 同时也去掉
通知提示音 这就要分析通知提示音是怎么发出来的
首先我们需要知道在SystemUI启动的时候会Start()一个媒体播放的类RingtonePlayer。
通知是通过RingtonePlayer 来播放通知声音
而 NotificationManagerService.java 中 负责管理通知声音的播放
frameworks\base\services\core\java\com\android\server\notification\NotificationManagerService.java
protected class PostNotificationRunnable implements Runnable {
private final String key;
PostNotificationRunnable(String key) {
this.key = key;
}
@Override
public void run