如題,Android 7.0中 來電,鎖屏的時候是顯示全屏界面,解鎖的時候是顯示的懸浮通知,是在哪里做判斷處理的?
uj5u.com熱心網友回復:
是通過通知本身來處理的,在創建通知的時候,設定setCategory(Notification.CATEGORY_CALL)。uj5u.com熱心網友回復:
這里鬧鐘與來電的全屏界面都是通過如下路徑來觸發全屏界面的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文章,可以查看我的博客,送人玫瑰,手留余香。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/43989.html
標籤:Android
