Android 7.0 来电,锁屏的时候是显示全屏界面,解锁的时候是显示的悬浮通知,是在哪里做判断处理的?

Mayxizi 2017-05-28 04:00:52
如题,Android 7.0中 来电,锁屏的时候是显示全屏界面,解锁的时候是显示的悬浮通知,是在哪里做判断处理的?
...全文
787 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Rom_Fisher 2020-04-14
  • 打赏
  • 举报
回复
这里闹钟与来电的全屏界面都是通过如下路径来触发全屏界面的
NotificationEntryManager.java
private void addNotificationInternal(StatusBarNotification notification,
NotificationListenerService.RankingMap ranking) throws InflationException {
String key = notification.getKey();
...
try {
EventLog.writeEvent(EventLogTags.SYSUI_FULLSCREEN_NOTIFICATION,
key);
//通过发送把来电或者闹钟通知的pendingintent send来通知来电或者闹钟模块显示全屏界面,如此
notification.getNotification().fullScreenIntent.send();
shadeEntry.notifyFullScreenIntentLaunched();
mMetricsLogger.count("note_fullscreen", 1);
} catch (PendingIntent.CanceledException e) {
}
,更多的相关SystemUI文章,可以查看我的博客,送人玫瑰,手留余香。
Mayxizi 2017-06-26
  • 打赏
  • 举报
回复
是通过通知本身来处理的,在创建通知的时候,设置setCategory(Notification.CATEGORY_CALL)。

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧