当前位置:   article > 正文

android截获intent,Android P Notification(3) 之 Fullscreen intent被拦截

fullscreenintent

1.来电话时发现全屏通知被拦截

拦截原因

1): No Fullscreen intent: suppressed by DND(do not disturb) 被勿扰模式拦截

2).No Fullscreen intent: not important enough 通知优先级不够

2.Fullscreen intent app处理

incallUI发送通知的代码如下

@/packages/apps/Dialer/java/com/android/incallui/StatusBarNotifier.java

private void buildAndSendNotification(

LogUtil.i("StatusBarNotifier.buildAndSendNotification", "notificationType=" + notificationType); //2 log会打印2,表示incallUI发送通知开始

switch (notificationType) {

case NOTIFICATION_INCOMING_CALL: //2

if (BuildCompat.isAtLeastO()) {

builder.setChannelId(NotificationChannelId.INCOMING_CALL); //channel id : INCOMING_CALL

}

// Set the intent as a full screen intent as well if a call is incoming

configureFullScreenIntent(builder, createLaunchPendingIntent(true /* isFullScreen */)); //发送全屏通知

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/575574
推荐阅读
相关标签
  

闽ICP备14008679号