/aosp14/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
H A D | NotificationRecordTest.java | 312 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testSound_default_upgradeUsesChannel() 364 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testVibration_custom_upgradeUsesChannel() 374 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testVibration_insistent_createsInsistentVibrationEffect() 417 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testImportance_upgrade() 461 NotificationRecord.Light expected = new NotificationRecord.Light( in testLights_upgrade_defaultLights() 466 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testLights_upgrade_defaultLights() 477 NotificationRecord.Light expected = new NotificationRecord.Light( in testLights_upgrade() 482 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testLights_upgrade() 501 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testLogMaker() 531 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testLogMakerImportanceApp() [all …]
|
H A D | GlobalSortKeyComparatorTest.java | 50 NotificationRecord left = new NotificationRecord(getContext(), in testComparator() 57 NotificationRecord right = new NotificationRecord(getContext(), in testComparator() 64 NotificationRecord last = new NotificationRecord(getContext(), in testComparator() 71 final List<NotificationRecord> expected = new ArrayList<>(); in testComparator() 76 List<NotificationRecord> actual = new ArrayList<>(); in testComparator() 89 NotificationRecord left = new NotificationRecord(getContext(), in testNoCrash_leftNull() 95 NotificationRecord right = new NotificationRecord(getContext(), in testNoCrash_leftNull() 106 List<NotificationRecord> actual = new ArrayList<>(); in testNoCrash_leftNull() 119 NotificationRecord left = new NotificationRecord(getContext(), in testNoCrash_rightNull() 126 NotificationRecord right = new NotificationRecord(getContext(), in testNoCrash_rightNull() [all …]
|
H A D | BuzzBeepBlinkTest.java | 202 private NotificationRecord getBeepyNotification() { in getBeepyNotification() 217 private NotificationRecord getQuietNotification() { in getQuietNotification() 247 private NotificationRecord getBuzzyNotification() { in getBuzzyNotification() 293 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getCallRecord() 390 NotificationRecord r = new NotificationRecord(context, sbn, mChannel); in getNotificationRecord() 502 NotificationRecord r = getBeepyNotification(); in testBeep() 515 NotificationRecord r = getBeepyNotification(); in testLockedPrivateA11yRedaction() 1215 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testEmptyUriSoundTreatedAsNoSound() 1270 NotificationRecord r = new NotificationRecord(getContext(), sbn, in testCrossUserSoundMuted() 1310 NotificationRecord r = new NotificationRecord(getContext(), sbn, in testA11yCrossUserEventNotSent() [all …]
|
H A D | RankingHelperTest.java | 215 ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(7); in testSortShouldRespectCritical() 242 NotificationRecord notificationRecord = new NotificationRecord(getContext(), sbn, channel); in generateRecord() 249 ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(4); in testFindAfterRankingWithASplitGroup() 263 ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(2); in testSortShouldNotThrowWithPlainNotifications() 271 ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(2); in testSortShouldNotThrowOneSorted() 279 ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(1); in testSortShouldNotThrowOneNotification() 286 ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(1); in testSortShouldNotThrowOneSortKey() 293 ArrayList<NotificationRecord> notificationList = new ArrayList<NotificationRecord>(); in testSortShouldNotThrowOnEmptyList() 305 NotificationRecord lowSummary = new NotificationRecord(mContext, new StatusBarNotification( in testGroupNotifications_highestIsProxy() 311 NotificationRecord low = new NotificationRecord(mContext, new StatusBarNotification( in testGroupNotifications_highestIsProxy() [all …]
|
H A D | NotificationComparatorTest.java | 92 private NotificationRecord mRecordMinCall; 93 private NotificationRecord mRecordHighCall; 94 private NotificationRecord mRecordHighCallStyle; 95 private NotificationRecord mRecordEmail; 96 private NotificationRecord mRecordSystemMax; 97 private NotificationRecord mRecordInlineReply; 98 private NotificationRecord mRecordSms; 100 private NotificationRecord mRecordContact; 101 private NotificationRecord mRecordUrgent; 102 private NotificationRecord mRecordCheater; [all …]
|
H A D | SnoozeHelperTest.java | 210 NotificationRecord r = getNotificationRecord( in testReadNoneSnoozedNotification() 563 NotificationRecord r = getNotificationRecord("pkg", 1, "tag", 585 NotificationRecord r = getNotificationRecord("pkg", 1, "tag", 602 NotificationRecord r = getNotificationRecord("pkg", 1, "tag", 623 NotificationRecord r = getNotificationRecord("pkg", 1, "tag", 634 NotificationRecord r = getNotificationRecord( 636 NotificationRecord r2 = getNotificationRecord( 651 NotificationRecord r = getNotificationRecord( 653 NotificationRecord r2 = getNotificationRecord( 682 NotificationRecord r = getNotificationRecord( [all …]
|
H A D | BadgeExtractorTest.java | 82 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecord() 113 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecordWithBubble() 138 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecordWithMedia() 153 NotificationRecord r = getNotificationRecord(false, IMPORTANCE_UNSPECIFIED); in testAppYesChannelNo() 167 NotificationRecord r = getNotificationRecord(true, IMPORTANCE_HIGH); in testAppNoChannelYes() 181 NotificationRecord r = getNotificationRecord(true, IMPORTANCE_UNSPECIFIED); in testAppYesChannelYes() 195 NotificationRecord r = getNotificationRecord(false, IMPORTANCE_UNSPECIFIED); in testAppNoChannelNo() 209 NotificationRecord r = getNotificationRecord(true, IMPORTANCE_HIGH); in testAppYesChannelYesUserNo() 283 NotificationRecord r = getNotificationRecord(true, IMPORTANCE_UNSPECIFIED); in testHideMediaNotifNotMediaStyleOverridesNo() 297 NotificationRecord r = getNotificationRecord(true, IMPORTANCE_UNSPECIFIED); in testDndOverridesYes() [all …]
|
H A D | BubbleExtractorTest.java | 109 private NotificationRecord getNotificationRecord(boolean addBubble) { in getNotificationRecord() 131 NotificationRecord r = new NotificationRecord(getContext(), sbn, mChannel); in getNotificationRecord() 173 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppYesChannelNo() 187 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppYesChannelDefault() 201 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppYesChannelYes() 215 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppYesChannelYesFeatureNo() 230 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppNoChannelYes() 245 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppNoChannelDefault() 260 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppSelectedChannelDefault() 275 NotificationRecord r = getNotificationRecord(true /* bubble */); in testAppSelectedChannelNo() [all …]
|
H A D | ZenModeFilteringTest.java | 95 private NotificationRecord getNotificationRecord() { in getNotificationRecord() 103 return new NotificationRecord(mContext, sbn, c); in getNotificationRecord() 108 NotificationRecord r = mock(NotificationRecord.class); in getConversationRecord() 127 NotificationRecord r = mock(NotificationRecord.class); in getCallRecordWithPeopleInfo() 141 NotificationRecord r = getNotificationRecord(); in testIsMessage() 166 NotificationRecord r = getNotificationRecord(); in testIsAlarm_wrongCategory() 183 NotificationRecord r = getNotificationRecord(); in testSuppressDNDInfo_yes_VisEffectsAllowed() 194 NotificationRecord r = getNotificationRecord(); in testSuppressDNDInfo_yes_WrongId() 204 NotificationRecord r = getNotificationRecord(); in testSuppressDNDInfo_yes_WrongPackage() 214 NotificationRecord r = getNotificationRecord(); in testSuppressDNDInfo_no() [all …]
|
H A D | NotificationRecordLoggerFake.java | 45 CallRecord(NotificationRecord r, NotificationRecord old, int position, in CallRecord() 55 CallRecord(NotificationRecord r, int position, int buzzBeepBlink, InstanceId groupId) { in CallRecord() 64 CallRecord(NotificationRecord r, UiEventLogger.UiEventEnum event) { in CallRecord() 94 public NotificationReported prepareToLogNotificationPosted(@Nullable NotificationRecord r, in prepareToLogNotificationPosted() 95 @Nullable NotificationRecord old, int position, int buzzBeepBlink, InstanceId groupId) { in prepareToLogNotificationPosted() 121 public void logNotificationAdjusted(NotificationRecord r, int position, int buzzBeepBlink, in logNotificationAdjusted() 127 public void log(UiEventLogger.UiEventEnum event, NotificationRecord r) { in log()
|
H A D | NotificationManagerServiceTest.java | 956 NotificationRecord r = (NotificationRecord) invocationOnMock.getArguments()[0]; in getSignalExtractorSideEffects() 961 NotificationRecord r = (NotificationRecord) invocationOnMock.getArguments()[0]; in getSignalExtractorSideEffects() 1101 NotificationRecord r = new NotificationRecord(mContext, sbn, channel); in testLimitTimeOutBroadcast() 6663 NotificationRecord pkgA = new NotificationRecord(mContext, in testHideAndUnhideNotificationsOnDistractingPackageBroadcast() 6666 NotificationRecord pkgB = new NotificationRecord(mContext, in testHideAndUnhideNotificationsOnDistractingPackageBroadcast() 6692 NotificationRecord pkgA = new NotificationRecord(mContext, in testHideAndUnhideNotificationsOnDistractingPackageBroadcast_multiPkg() 6695 NotificationRecord pkgB = new NotificationRecord(mContext, in testHideAndUnhideNotificationsOnDistractingPackageBroadcast_multiPkg() 11164 NotificationRecord pkgA = new NotificationRecord(mContext, 11167 NotificationRecord pkgB = new NotificationRecord(mContext, 11195 NotificationRecord pkgA = new NotificationRecord(mContext, [all …]
|
H A D | VisibilityExtractorTest.java | 79 private NotificationRecord getNotificationRecord(int visibility) { in getNotificationRecord() 91 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecord() 110 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalAllDpmAllChannelAll() 128 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalNoneDpmAllChannelAll() 146 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalSomeDpmAllChannelAll() 165 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalAllDpmNoneChannelAll() 184 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalAllDpmSomeChannelAll() 202 NotificationRecord r = getNotificationRecord(VISIBILITY_SECRET); in testGlobalAllDpmAllChannelNone() 220 NotificationRecord r = getNotificationRecord(VISIBILITY_PRIVATE); in testGlobalAllDpmAllChannelSome() 239 NotificationRecord r = getNotificationRecord(VISIBILITY_SECRET); in testGlobalAllDpmSomeChannelNone()
|
H A D | NotificationIntrusivenessExtractorTest.java | 51 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testNonIntrusive() 70 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testIntrusive_fillScreen() 90 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testOldNotificationsNotIntrusive()
|
H A D | NotificationChannelExtractorTest.java | 65 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testExtractsUpdatedChannel() 92 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testInvalidShortcutFlagEnabled_looksUpCorrectChannel() 120 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testInvalidShortcutFlagDisabled_looksUpCorrectChannel()
|
H A D | ImportanceExtractorTest.java | 62 private NotificationRecord getNotificationRecord(NotificationChannel channel) { in getNotificationRecord() 72 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecord() 88 NotificationRecord r = getNotificationRecord(channel); in testAppPreferenceChannelNone() 105 NotificationRecord r = getNotificationRecord(channel); in testAppPreferenceChannelPreference()
|
H A D | ZenModeExtractorTest.java | 57 NotificationRecord r = generateRecord(); in testExtractIntercepted() 74 NotificationRecord r = generateRecord(); in testExtractVisualDisturbancesNotIntercepted() 89 NotificationRecord r = generateRecord(); in testExtractVisualDisturbancesIntercepted() 103 private NotificationRecord generateRecord() { in generateRecord() 111 return new NotificationRecord(getContext(), sbn, channel); in generateRecord()
|
H A D | NotificationRecordExtractorDataTest.java | 40 NotificationRecord r = generateRecord(); in testHasDiffs_noDiffs() 68 NotificationRecord r = generateRecord(); in testHasDiffs_proposedImportanceChange() 102 NotificationRecord r = generateRecord(); in testHasDiffs_autoBundled() 137 NotificationRecord r = generateRecord(); in testHasDiffs_sensitiveContentChange() 169 private NotificationRecord generateRecord() { in generateRecord() 177 return new NotificationRecord(getContext(), sbn, channel); in generateRecord()
|
H A D | ShortcutHelperTest.java | 79 NotificationRecord mNr; 108 private void setUpMockNotificationRecord(NotificationRecord mockRecord, String key) { in setUpMockNotificationRecord() 179 NotificationRecord validMock1 = Mockito.mock(NotificationRecord.class); in testNotifNoLongerHasShortcut_listenerRemoved() 182 NotificationRecord validMock2 = Mockito.mock(NotificationRecord.class); in testNotifNoLongerHasShortcut_listenerRemoved() 185 NotificationRecord validMock3 = Mockito.mock(NotificationRecord.class); in testNotifNoLongerHasShortcut_listenerRemoved()
|
/aosp14/frameworks/base/services/core/java/com/android/server/notification/ |
H A D | NotificationComparator.java | 37 class NotificationComparator implements Comparator<NotificationRecord> { 57 public int compare(NotificationRecord left, NotificationRecord right) { in compare() 148 private boolean isImportantColorized(NotificationRecord record) { in isImportantColorized() 155 private boolean isImportantOngoing(NotificationRecord record) { in isImportantOngoing() 168 protected boolean isImportantPeople(NotificationRecord record) { in isImportantPeople() 178 protected boolean isImportantMessaging(NotificationRecord record) { in isImportantMessaging() 182 protected boolean isSystemMax(NotificationRecord record) { in isSystemMax() 196 private boolean isMediaNotification(NotificationRecord record) { in isMediaNotification() 200 private boolean isCallCategory(NotificationRecord record) { in isCallCategory() 205 private boolean isCallStyle(NotificationRecord record) { in isCallStyle()
|
H A D | SnoozeHelper.java | 168 ArrayList<NotificationRecord> getNotifications(String pkg, in getNotifications() 170 ArrayList<NotificationRecord> records = new ArrayList<>(); in getNotifications() 173 NotificationRecord r = mSnoozedNotifications.valueAt(i); in getNotifications() 183 protected NotificationRecord getNotification(String key) { in getNotification() 189 protected @NonNull List<NotificationRecord> getSnoozed() { in getSnoozed() 193 List<NotificationRecord> snoozed = new ArrayList<>(); in getSnoozed() 202 protected void snooze(NotificationRecord record, long duration) { in snooze() 228 private void snooze(NotificationRecord record) { in snooze() 246 final Set<Map.Entry<String, NotificationRecord>> records = in cancel() 294 protected void update(int userId, NotificationRecord record) { in update() [all …]
|
H A D | RankingHelper.java | 39 private final ArrayMap<String, NotificationRecord> mProxyByGroupTmp = new ArrayMap<>(); 84 public void extractSignals(NotificationRecord r) { in extractSignals() 99 public void sort(ArrayList<NotificationRecord> notificationList) { in sort() 115 final NotificationRecord record = notificationList.get(i); in sort() 118 NotificationRecord existingProxy = mProxyByGroupTmp.get(groupKey); in sort() 126 final NotificationRecord record = notificationList.get(i); in sort() 127 NotificationRecord groupProxy = mProxyByGroupTmp.get(record.getGroupKey()); in sort() 163 public int indexOf(ArrayList<NotificationRecord> notificationList, NotificationRecord target) { in indexOf()
|
H A D | ZenModeFiltering.java | 138 private static Bundle extras(NotificationRecord record) { in extras() 143 protected void recordCall(NotificationRecord record) { in recordCall() 151 NotificationRecord record) { in shouldIntercept() 308 private boolean isCritical(NotificationRecord record) { in isCritical() 323 protected static boolean isAlarm(NotificationRecord record) { in isAlarm() 328 private static boolean isEvent(NotificationRecord record) { in isEvent() 336 public boolean isCall(NotificationRecord record) { in isCall() 341 public boolean isMedia(NotificationRecord record) { in isMedia() 347 public boolean isSystem(NotificationRecord record) { in isSystem() 364 protected boolean isMessage(NotificationRecord record) { in isMessage() [all …]
|
H A D | GlobalSortKeyComparator.java | 25 public class GlobalSortKeyComparator implements Comparator<NotificationRecord> { 29 public int compare(NotificationRecord left, NotificationRecord right) { in compare()
|
H A D | NotificationRecordLogger.java | 72 default NotificationReported prepareToLogNotificationPosted(@Nullable NotificationRecord r, in prepareToLogNotificationPosted() 73 @Nullable NotificationRecord old, in prepareToLogNotificationPosted() 99 void logNotificationAdjusted(@Nullable NotificationRecord r, in logNotificationAdjusted() 110 default void logNotificationCancelled(@Nullable NotificationRecord r, in logNotificationCancelled() 122 default void logNotificationVisibility(@Nullable NotificationRecord r, boolean visible) { in logNotificationVisibility() 129 void log(UiEventLogger.UiEventEnum event, NotificationRecord r); in log() 371 public final NotificationRecord r, old; 377 NotificationRecordPair(@Nullable NotificationRecord r, @Nullable NotificationRecord old) { in NotificationRecordPair() 556 static int getLoggingImportance(@NonNull NotificationRecord r) { in getLoggingImportance() 569 static boolean isForegroundService(@NonNull NotificationRecord r) { in isForegroundService() [all …]
|
H A D | NotificationManagerService.java | 6817 final NotificationRecord r = new NotificationRecord(getContext(), n, channel); 7772 private final NotificationRecord r; 8095 @NonNull NotificationRecord r) { 8245 private void handleGroupedNotificationLocked(NotificationRecord r, NotificationRecord old, 9929 NotificationRecord r; 9941 NotificationRecord r; 10710 final NotificationRecord r, 10751 final NotificationRecord r) { 10973 private void notifyListenersPostedAndLogLocked(NotificationRecord r, NotificationRecord old, 11376 void notifyPostedLocked(NotificationRecord r, NotificationRecord old) { [all …]
|