Android7.0 Notification控制
来源:互联网 发布:淘宝服务能退款吗 编辑:程序博客网 时间:2024/06/07 06:36
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/Basestatusbar.java
当有通知过来的时候就会走这里,如果想invalid所以通知就在这里做。
@Overridepublic void onNotificationPosted(final StatusBarNotification sbn, final RankingMap rankingMap) { if (DEBUG) Log.d(TAG, "onNotificationPosted: " + sbn); if (sbn != null) { mHandler.post(new Runnable() { @Override public void run() { processForRemoteInput(sbn.getNotification()); String key = sbn.getKey(); mKeysKeptForRemoteInput.remove(key); boolean isUpdate = mNotificationData.get(key) != null; // In case we don't allow child notifications, we ignore children of // notifications that have a summary, since we're not going to show them // anyway. This is true also when the summary is canceled, // because children are automatically canceled by NoMan in that case. if (!ENABLE_CHILD_NOTIFICATIONS && mGroupManager.isChildInGroupWithSummary(sbn)) { if (DEBUG) { Log.d(TAG, "Ignoring group child due to existing summary: " + sbn); } // Remove existing notification to avoid stale data. if (isUpdate) { removeNotification(key, rankingMap); } else { mNotificationData.updateRanking(rankingMap); } return; } if (isUpdate) { updateNotification(sbn, rankingMap); } else { addNotification(sbn, rankingMap, null /* oldEntry */); } } }); }}
阅读全文
0 0
- Android7.0 Notification控制
- Android7.0 SystemUI StatusBar和Notification代码浅析
- Android7.0 Notification Show silently 阻止通知 定制
- android7.0
- Android7.0新特性
- Android7.0官方Samples
- Android7.0 API变更
- Android7.0抢鲜用!!
- Android7.0 MessageQueue
- Android7.0 分屏多窗口
- Android7.0新特性
- Android7.0 nougat适配
- Android7.0 BatteryService
- Android7.0 BatteryStatsService
- Android7.0 Doze模式
- Android7.0 编译问题
- android7.0适配
- Android7.0之FileProvider
- 关于indexedDB的基本使用
- JAVA里使用Jetty作为轻量级嵌入式的Web容器
- shell之 2>&1
- python基础学习
- 前端常用函数(一)
- Android7.0 Notification控制
- Python之禅
- C语言 运算符
- python 使用MySQL数据库的实例代码
- iOS 跳转到系统指定设置界面
- 第十三章 整体部分
- 将整数A转换为B
- ss3常用动画+动画库
- 数据中心管理常见错误,犯一个就是致命的