/aosp14/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
H A D | NotificationRecordTest.java | 864 StatusBarNotification sbn = in testCalculateGrantableUris_PappProvided() local 885 StatusBarNotification sbn = in testCalculateGrantableUris_PappProvided_invalidSound() local 904 StatusBarNotification sbn = in testCalculateGrantableUris_PuserOverridden() local 921 StatusBarNotification sbn = in testCalculateGrantableUris_prePappProvided() local 969 record = new NotificationRecord(mMockContext, sbn, channel); in testCalculateImportance_systemImportance() 989 record = new NotificationRecord(mMockContext, sbn, channel); in testCalculateImportance_asstImportance() 1195 StatusBarNotification sbn = getMessagingStyleNotification(); in testIsConversation() local 1247 StatusBarNotification sbn = getMessagingStyleNotification(); in testIsConversation_noShortcut() local 1257 StatusBarNotification sbn = getMessagingStyleNotification(); in testIsConversation_noShortcut_appHasPreviousSentFullConversation() local 1268 StatusBarNotification sbn = getMessagingStyleNotification(); in testIsConversation_noShortcut_userDemotedApp() local [all …]
|
H A D | GroupHelperTest.java | 320 notifications.add(sbn); in testAutoGrouped_allOngoing_updateChildNotOngoing() 347 notifications.add(sbn); in testAutoGrouped_singleOngoing_removeOngoingChild() 369 notifications.add(sbn); in testAutoGrouped_noOngoing_updateOngoingChild() 393 notifications.add(sbn); in testAutoGrouped_noOngoing_addOngoingChild() 421 notifications.add(sbn); in testAutoGrouped_singleOngoing_appGroupOngoingChild() 447 notifications.add(sbn); in testAutoGrouped_singleOngoing_removeNonOngoingChild() 470 notifications.add(sbn); in testAutoGrouped_allAutoCancel_updateChildNotAutoCancel() 564 posted.add(sbn); in testDropToZeroRemoveGroup() 592 posted.add(sbn); in testAppStartsGrouping() 621 posted.add(sbn); in testNewNotificationsAddedToAutogroup_ifOriginalNotificationsCanceled() [all …]
|
H A D | ArchiveTest.java | 91 expected.add(sbn.getKey()); in testRecordAndRead() 92 mArchive.record(sbn, REASON_CANCEL); in testRecordAndRead() 112 if (sbn.getUserId() == USER_NULL) { in testCrossUser() 123 mArchive.record(sbn, REASON_CANCEL); in testRecordAndRead_overLimit() 125 expected.add(sbn.getKey()); in testRecordAndRead_overLimit() 144 mArchive.record(sbn, REASON_CANCEL); in testDoesNotRecordIfHistoryDisabled() 146 expected.add(sbn.getKey()); in testDoesNotRecordIfHistoryDisabled() 164 mArchive.record(sbn, REASON_CANCEL); in testRemovesEntriesWhenHistoryDisabled() 166 expected.add(sbn.getKey()); in testRemovesEntriesWhenHistoryDisabled() 191 expected.add(sbn.getKey()); in testRemoveChannelNotifications() [all …]
|
H A D | NotificationIntrusivenessExtractorTest.java | 49 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, in testNonIntrusive() local 51 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testNonIntrusive() 67 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, in testIntrusive_fillScreen() local 70 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testIntrusive_fillScreen() 86 StatusBarNotification sbn = new StatusBarNotification("", "", 0, "", 0, in testOldNotificationsNotIntrusive() local 90 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testOldNotificationsNotIntrusive()
|
H A D | ZenModeFilteringTest.java | 102 when(sbn.getNotification()).thenReturn(notification); in getNotificationRecord() 103 return new NotificationRecord(mContext, sbn, c); in getNotificationRecord() 107 StatusBarNotification sbn) { in getConversationRecord() argument 110 when(r.getSbn()).thenReturn(sbn); in getConversationRecord() 131 when(sbn.getNotification()).thenReturn(notification); in getCallRecordWithPeopleInfo() 132 when(r.getSbn()).thenReturn(sbn); in getCallRecordWithPeopleInfo() 255 NotificationRecord r = getConversationRecord(channel, sbn); in testConversation_allAllowed() 274 NotificationRecord r = getConversationRecord(channel, sbn); in testConversation_importantAllowed_isImportant() 291 NotificationRecord r = getConversationRecord(channel, sbn); in testConversation_importantAllowed_isNotImportant() 308 NotificationRecord r = getConversationRecord(channel, sbn); in testConversation_noneAllowed_notCallOrMsg() [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/notification/ |
H A D | GroupHelper.java | 93 if (!sbn.isAppGroup()) { in onNotificationPosted() 94 maybeGroup(sbn, autogroupSummaryExists); in onNotificationPosted() 96 maybeUngroup(sbn, false, sbn.getUserId()); in onNotificationPosted() 106 maybeUngroup(sbn, true, sbn.getUserId()); in onNotificationRemoved() 125 String key = generatePackageKey(sbn.getUserId(), sbn.getPackageName()); in maybeGroup() 129 children.put(sbn.getKey(), sbn.getNotification().flags); in maybeGroup() 139 mCallback.updateAutogroupSummary(sbn.getUserId(), sbn.getPackageName(), flags); in maybeGroup() 142 sbn.getUserId(), sbn.getPackageName(), sbn.getKey(), flags); in maybeGroup() 165 String key = generatePackageKey(sbn.getUserId(), sbn.getPackageName()); in maybeUngroup() 173 if (children.containsKey(sbn.getKey())) { in maybeUngroup() [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/util/ |
H A D | NotificationMessagingUtil.java | 53 public boolean isImportantMessaging(StatusBarNotification sbn, int importance) { in isImportantMessaging() argument 58 return hasMessagingStyle(sbn) || (isCategoryMessage(sbn) && isDefaultMessagingApp(sbn)); in isImportantMessaging() 61 public boolean isMessaging(StatusBarNotification sbn) { in isMessaging() argument 62 return hasMessagingStyle(sbn) || isDefaultMessagingApp(sbn) || isCategoryMessage(sbn); in isMessaging() 66 private boolean isDefaultMessagingApp(StatusBarNotification sbn) { in isDefaultMessagingApp() argument 67 final int userId = sbn.getUserId(); in isDefaultMessagingApp() 73 return Objects.equals(mDefaultSmsApp.get(userId), sbn.getPackageName()); in isDefaultMessagingApp() 95 private boolean hasMessagingStyle(StatusBarNotification sbn) { in hasMessagingStyle() argument 96 return sbn.getNotification().isStyle(Notification.MessagingStyle.class); in hasMessagingStyle() 99 private boolean isCategoryMessage(StatusBarNotification sbn) { in isCategoryMessage() argument [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | RemoteInputNotificationRebuilder.java | 99 StatusBarNotification sbn = entry.getSbn(); in rebuildWithRemoteInputInserted() local 107 Parcelable[] oldHistoryItems = sbn.getNotification().extras in rebuildWithRemoteInputInserted() 128 sbn.getPackageName(), in rebuildWithRemoteInputInserted() 129 sbn.getOpPkg(), in rebuildWithRemoteInputInserted() 130 sbn.getId(), in rebuildWithRemoteInputInserted() 131 sbn.getTag(), in rebuildWithRemoteInputInserted() 132 sbn.getUid(), in rebuildWithRemoteInputInserted() 133 sbn.getInitialPid(), in rebuildWithRemoteInputInserted() 135 sbn.getUser(), in rebuildWithRemoteInputInserted() 136 sbn.getOverrideGroupKey(), in rebuildWithRemoteInputInserted() [all …]
|
H A D | NotificationListener.java | 121 for (StatusBarNotification sbn : notifications) { in onListenerConnected() 126 for (StatusBarNotification sbn : notifications) { in onListenerConnected() 128 listener.onNotificationPosted(sbn, completeMap); in onListenerConnected() 140 public void onNotificationPosted(final StatusBarNotification sbn, in onNotificationPosted() argument 142 if (DEBUG) Log.d(TAG, "onNotificationPosted: " + sbn); in onNotificationPosted() 143 if (sbn != null && !onPluginNotificationPosted(sbn, rankingMap)) { in onNotificationPosted() 145 processForRemoteInput(sbn.getNotification(), mContext); in onNotificationPosted() 148 handler.onNotificationPosted(sbn, rankingMap); in onNotificationPosted() 158 if (sbn != null && !onPluginNotificationRemoved(sbn, rankingMap)) { in onNotificationRemoved() 161 handler.onNotificationRemoved(sbn, rankingMap, reason); in onNotificationRemoved() [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/service/notification/ |
H A D | StatusBarNotificationTest.java | 111 final LogMaker logMaker = sbn.getLogMaker(); in testLogMakerNoStaleData() 114 assertNull(sbn.getLogMaker().getTaggedData(extraTag)); in testLogMakerNoStaleData() 167 sbn.setOverrideGroupKey(GROUP_ID_2); in testLogMakerOverrideGroup() 171 sbn.setOverrideGroupKey(null); in testLogMakerOverrideGroup() 197 assertTrue(sbn.isAppGroup()); in testIsAppGroup() 199 sbn = getNotification(PKG, null, CHANNEL_ID); in testIsAppGroup() 200 assertFalse(sbn.isAppGroup()); in testIsAppGroup() 205 sbn = getNotification(PKG, nb); in testIsAppGroup() 206 assertTrue(sbn.isAppGroup()); in testIsAppGroup() 229 sbn.setOverrideGroupKey("addsToKey"); in testGetUidFromKey() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coalescer/ |
H A D | GroupCoalescer.java | 131 maybeEmitBatch(sbn); 137 mLogger.logEventCoalesced(sbn.getKey()); 146 maybeEmitBatch(sbn); 148 mHandler.onNotificationRemoved(sbn, rankingMap); 153 StatusBarNotification sbn, 156 maybeEmitBatch(sbn); 199 StatusBarNotification sbn, in handleNotificationPosted() argument 202 if (mCoalescedEvents.containsKey(sbn.getKey())) { in handleNotificationPosted() 207 if (sbn.isGroup()) { in handleNotificationPosted() 212 sbn.getKey(), in handleNotificationPosted() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ |
H A D | TargetSdkResolver.kt | 37 override fun onEntryBind(entry: NotificationEntry, sbn: StatusBarNotification) { 38 entry.targetSdk = resolveNotificationSdk(sbn) 43 private fun resolveNotificationSdk(sbn: StatusBarNotification): Int { 44 val applicationInfo = getApplicationInfoFromExtras(sbn.notification) 45 ?: getApplicationInfoFromPackageManager(sbn) 56 private fun getApplicationInfoFromPackageManager(sbn: StatusBarNotification): ApplicationInfo? { 57 val pmUser = CentralSurfaces.getPackageManagerForUser(context, sbn.user.identifier) 60 pmUser.getApplicationInfo(sbn.packageName, 0) 62 Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.packageName, ex)
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/ |
H A D | TargetSdkResolverTest.kt | 77 val sbn = createSbn(notification) regex 78 val entry = createNotificationEntry(sbn) 80 notifListener.onEntryBind(entry, sbn) 88 val sbn = createSbn(Notification()) regex 89 val entry = createNotificationEntry(sbn) 93 notifListener.onEntryBind(entry, sbn) 101 val sbn = createSbn(Notification()) regex 102 val entry = createNotificationEntry(sbn) 106 notifListener.onEntryBind(entry, sbn) 117 private fun createNotificationEntry(sbn: StatusBarNotification) = [all …]
|
H A D | NoManSimulator.java | 61 public NotifEvent retractNotif(StatusBarNotification sbn, int reason) { in retractNotif() argument 62 assertNotNull(mRankings.remove(sbn.getKey())); in retractNotif() 65 listener.onNotificationRemoved(sbn, rankingMap, reason); in retractNotif() 67 return new NotifEvent(sbn, null, rankingMap); in retractNotif() 99 public final StatusBarNotification sbn; field in NoManSimulator.NotifEvent 104 StatusBarNotification sbn, in NotifEvent() argument 107 this.key = sbn.getKey(); in NotifEvent() 108 this.sbn = sbn; in NotifEvent()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tv/notifications/ |
H A D | TvNotificationHandler.java | 64 public void onNotificationPosted(StatusBarNotification sbn, in onNotificationPosted() argument 66 if (!new Notification.TvExtender(sbn.getNotification()).isAvailableOnTv()) { in onNotificationPosted() 71 mNotifications.put(sbn.getId(), sbn); in onNotificationPosted() local 79 public void onNotificationRemoved(StatusBarNotification sbn, in onNotificationRemoved() argument 82 if (mNotifications.contains(sbn.getId())) { in onNotificationRemoved() 83 mNotifications.remove(sbn.getId()); in onNotificationRemoved() 93 public void onNotificationRemoved(StatusBarNotification sbn, in onNotificationRemoved() argument 95 onNotificationRemoved(sbn, rankingMap); in onNotificationRemoved()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/dreams/ |
H A D | DreamOverlayNotificationCountProvider.java | 47 StatusBarNotification sbn, NotificationListenerService.RankingMap rankingMap) { 48 if (sbn.isOngoing()) { 52 mNotificationKeys.add(sbn.getKey()); 58 StatusBarNotification sbn, NotificationListenerService.RankingMap rankingMap) { 59 mNotificationKeys.remove(sbn.getKey()); 65 StatusBarNotification sbn, 68 mNotificationKeys.remove(sbn.getKey()); 88 .forEach(sbn -> mNotificationKeys.add(sbn.getKey())); in DreamOverlayNotificationCountProvider()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coalescer/ |
H A D | GroupCoalescerTest.java | 103 verify(mListener).onNotificationPosted(notif1.sbn, notif1.rankingMap); in testUngroupedNotificationsAreNotCoalesced() 173 new CoalescedEvent(notif2.key, 1, notif2.sbn, notif2.ranking, null), in testCoalescedNotificationsArePosted() 174 new CoalescedEvent(notif1.key, 0, notif1.sbn, notif1.ranking, null), in testCoalescedNotificationsArePosted() 175 new CoalescedEvent(notif3.key, 2, notif3.sbn, notif3.ranking, null) in testCoalescedNotificationsArePosted() 211 new CoalescedEvent(notif2.key, 1, notif2.sbn, notif2.ranking, null), in testCoalescedEventsThatAreLaterUngroupedAreEmittedImmediatelyAndNotLater() 212 new CoalescedEvent(notif3.key, 2, notif3.sbn, notif3.ranking, null) in testCoalescedEventsThatAreLaterUngroupedAreEmittedImmediatelyAndNotLater() 250 new CoalescedEvent(notif1.key, 0, notif1.sbn, notif1.ranking, null), in testUpdatingCoalescedNotifTriggersBatchEmit() 277 NotifEvent notif2b = mNoMan.retractNotif(notif2a.sbn, 0); in testRemovingCoalescedNotifTriggersBatchEmit() 320 new CoalescedEvent(notif1.key, 0, notif1.sbn, ranking1b, null), in testRankingsAreUpdated() 321 new CoalescedEvent(notif2.key, 1, notif2.sbn, ranking2b, null) in testRankingsAreUpdated() [all …]
|
/aosp14/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/utils/ |
H A D | NotificationListener.kt | 27 override fun onNotificationPosted(sbn: StatusBarNotification) { 28 if (DEBUG) Log.d(TAG, "onNotificationPosted: $sbn") 29 notifications[sbn.key] = sbn 32 override fun onNotificationRemoved(sbn: StatusBarNotification) { 33 if (DEBUG) Log.d(TAG, "onNotificationRemoved: $sbn") 34 notifications.remove(sbn.key)
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
H A D | NotificationListenerWithPlugins.java | 88 public boolean onPluginNotificationPosted(StatusBarNotification sbn, in onPluginNotificationPosted() argument 91 if (plugin.onNotificationPosted(sbn, rankingMap)) { in onPluginNotificationPosted() 102 public boolean onPluginNotificationRemoved(StatusBarNotification sbn, in onPluginNotificationRemoved() argument 105 if (plugin.onNotificationRemoved(sbn, rankingMap)) { in onPluginNotificationRemoved() 159 public void addNotification(StatusBarNotification sbn) { in getProvider() argument 160 onNotificationPosted(sbn, getRankingMap()); in getProvider() 164 public void removeNotification(StatusBarNotification sbn) { in getProvider() argument 165 onNotificationRemoved(sbn, getRankingMap()); in getProvider()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ |
H A D | IconManager.kt | 115 val centeredIcon = if (entry.sbn.notification.isMediaNotification) { 157 it.notification = entry.sbn 162 it.notification = entry.sbn 167 it.notification = entry.sbn 172 it.notification = entry.sbn 204 val n = entry.sbn.notification 226 entry.sbn.user, 227 entry.sbn.packageName, 269 val extras: Bundle = entry.sbn.notification.extras 285 ic = entry.sbn.notification.getLargeIcon() [all …]
|
/aosp14/frameworks/base/core/java/android/service/notification/ |
H A D | NotificationAssistantService.java | 168 return onNotificationEnqueued(sbn); in onNotificationEnqueued() 182 return onNotificationEnqueued(sbn, channel); in onNotificationEnqueued() 211 onNotificationRemoved(sbn, rankingMap, reason); in onNotificationRemoved() 374 StatusBarNotification sbn; in onNotificationEnqueuedWithChannel() local 376 sbn = sbnHolder.get(); in onNotificationEnqueuedWithChannel() 381 if (sbn == null) { in onNotificationEnqueuedWithChannel() 389 args.arg1 = sbn; in onNotificationEnqueuedWithChannel() 399 StatusBarNotification sbn; in onNotificationSnoozedUntilContext() local 401 sbn = sbnHolder.get(); in onNotificationSnoozedUntilContext() 406 if (sbn == null) { in onNotificationSnoozedUntilContext() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/ |
H A D | NotificationPersonExtractorPlugin.java | 41 PersonData extractPerson(StatusBarNotification sbn); in extractPerson() argument 50 default String extractPersonKey(StatusBarNotification sbn) { in extractPersonKey() argument 51 return extractPerson(sbn).key; in extractPersonKey() 58 default boolean isPersonNotification(StatusBarNotification sbn) { in isPersonNotification() argument 59 return extractPersonKey(sbn) != null; in isPersonNotification()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/ |
H A D | MediaCoordinator.java | 114 final StatusBarNotification sbn = entry.getSbn(); in reportInflationError() local 118 sbn.getPackageName(), in reportInflationError() 119 sbn.getTag(), in reportInflationError() 120 sbn.getId(), in reportInflationError() 121 sbn.getUid(), in reportInflationError() 122 sbn.getInitialPid(), in reportInflationError() 124 sbn.getUser().getIdentifier()); in reportInflationError()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/ |
H A D | NotificationMemoryMeter.kt | 40 val packageName = entry.sbn.packageName 41 val uid = entry.sbn.uid 43 notificationMemoryUse(entry.sbn.notification, hashSetOf()) 48 NotificationUtils.logKey(entry.sbn.key), 49 entry.sbn.notification, 63 entry.sbn.packageName, 64 entry.sbn.uid, 65 NotificationUtils.logKey(entry.sbn.key), 66 entry.sbn.notification, 67 notificationMemoryUse(entry.sbn.notification, seenBitmaps),
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ |
H A D | NotificationGutsManager.java | 306 StatusBarNotification sbn = row.getEntry().getSbn(); in initializeSnoozeView() local 328 StatusBarNotification sbn = row.getEntry().getSbn(); in initializeFeedbackInfo() local 329 UserHandle userHandle = sbn.getUser(); in initializeFeedbackInfo() 346 StatusBarNotification sbn = row.getEntry().getSbn(); in initializeNotificationInfo() local 347 String packageName = sbn.getPackageName(); in initializeNotificationInfo() 350 UserHandle userHandle = sbn.getUser(); in initializeNotificationInfo() 401 String packageName = sbn.getPackageName(); in initializePartialConversationNotificationInfo() 404 UserHandle userHandle = sbn.getUser(); in initializePartialConversationNotificationInfo() 442 StatusBarNotification sbn = entry.getSbn(); in initializeConversationNotificationInfo() local 443 String packageName = sbn.getPackageName(); in initializeConversationNotificationInfo() [all …]
|