/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | NotificationRecordTest.java | 132 private static final NotificationRecord.Light CUSTOM_LIGHT = 133 new NotificationRecord.Light(1, 2, 3); 287 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_default_preUpgradeUsesNotification() 300 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_custom_preUpgradeUsesNotification() 314 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_default_userLocked_preUpgrade() 326 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testSound_noSound_preUpgrade() 339 NotificationRecord record = new NotificationRecord(mMockContext, sbn, channel); in testSound_default_upgradeUsesChannel() 352 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testVibration_default_preUpgradeUsesNotification() 364 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testVibration_custom_preUpgradeUsesNotification() 378 NotificationRecord record = new NotificationRecord(mMockContext, sbn, defaultChannel); in testVibration_custom_userLocked_preUpgrade() [all …]
|
D | RankingHelperTest.java | 102 private NotificationRecord mRecordGroupGSortA; 103 private NotificationRecord mRecordGroupGSortB; 104 private NotificationRecord mRecordNoGroup; 105 private NotificationRecord mRecordNoGroup2; 106 private NotificationRecord mRecordNoGroupSortA; 107 private NotificationRecord mRecentlyIntrusive; 108 private NotificationRecord mNewest; 168 mRecordGroupGSortA = new NotificationRecord(mContext, new StatusBarNotification( in setUp() 178 mRecordGroupGSortB = new NotificationRecord(mContext, new StatusBarNotification( in setUp() 186 mRecordNoGroup = new NotificationRecord(mContext, new StatusBarNotification( in setUp() [all …]
|
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() 102 final List<NotificationRecord> expected = new ArrayList<>(); in testNoCrash_leftNull() 106 List<NotificationRecord> actual = new ArrayList<>(); in testNoCrash_leftNull() 119 NotificationRecord left = new NotificationRecord(getContext(), in testNoCrash_rightNull() [all …]
|
D | NotificationAttentionHelperTest.java | 288 private NotificationRecord getNoisyOtherNotification() { in getNoisyOtherNotification() 293 private NotificationRecord getBeepyNotification() { in getBeepyNotification() 298 private NotificationRecord getBeepyOtherNotification() { in getBeepyOtherNotification() 303 private NotificationRecord getBeepyOnceNotification() { in getBeepyOnceNotification() 308 private NotificationRecord getQuietNotification() { in getQuietNotification() 313 private NotificationRecord getQuietOtherNotification() { in getQuietOtherNotification() 318 private NotificationRecord getQuietOnceNotification() { in getQuietOnceNotification() 323 private NotificationRecord getInsistentBeepyNotification() { in getInsistentBeepyNotification() 328 private NotificationRecord getInsistentBeepyOnceNotification() { in getInsistentBeepyOnceNotification() 333 private NotificationRecord getInsistentBeepyLeanbackNotification() { in getInsistentBeepyLeanbackNotification() [all …]
|
D | NotificationComparatorTest.java | 91 private NotificationRecord mRecordMinCallNonInterruptive; 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; 99 private NotificationRecord mRecordStarredContact; 100 private NotificationRecord mRecordContact; [all …]
|
D | SnoozeHelperTest.java | 163 NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM); in testReadValidSnoozedFromCorrectly_timeDeadline() 186 NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM); in testReadExpiredSnoozedNotification() 210 NotificationRecord r = getNotificationRecord( in testReadNoneSnoozedNotification() 249 NotificationRecord r = getNotificationRecord("pkg", 1, longTag, UserHandle.SYSTEM); in testLongTagPersistedNotification() 279 NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM); in testSnoozeForTime() 292 NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM); 303 NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM); 314 NotificationRecord r = getNotificationRecord("pkg", i, i+"", UserHandle.SYSTEM); 376 NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM); 377 NotificationRecord r2 = getNotificationRecord("pkg", 2, "two", UserHandle.SYSTEM); [all …]
|
D | BadgeExtractorTest.java | 68 private NotificationRecord getNotificationRecord(boolean showBadge, int importanceHigh) { in getNotificationRecord() 82 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecord() 86 private NotificationRecord getNotificationRecordWithBubble(boolean suppressNotif) { in getNotificationRecordWithBubble() 113 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecordWithBubble() 117 private NotificationRecord getNotificationRecordWithMedia(boolean excludeSession) { in getNotificationRecordWithMedia() 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() [all …]
|
D | NotificationTimeComparatorTest.java | 60 NotificationRecord one = mock(NotificationRecord.class); in testCompare() 63 NotificationRecord five = mock(NotificationRecord.class); in testCompare() 66 NotificationRecord ten = mock(NotificationRecord.class); in testCompare() 69 List<NotificationRecord> expected = new ArrayList<>(); in testCompare() 74 List<NotificationRecord> actual = new ArrayList<>(); in testCompare()
|
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 …]
|
D | ZenModeFilteringTest.java | 104 private NotificationRecord getNotificationRecord() { in getNotificationRecord() 108 private NotificationRecord getNotificationRecord(NotificationChannel c) { in getNotificationRecord() 112 return new NotificationRecord(mContext, sbn, c); in getNotificationRecord() 115 private NotificationRecord getConversationRecord(NotificationChannel c, in getConversationRecord() 117 NotificationRecord r = mock(NotificationRecord.class); in getConversationRecord() 133 private NotificationRecord getCallRecordWithPeopleInfo(String[] people, in getCallRecordWithPeopleInfo() 136 NotificationRecord r = mock(NotificationRecord.class); in getCallRecordWithPeopleInfo() 150 NotificationRecord r = getNotificationRecord(); in testIsMessage() 165 NotificationRecord r = getNotificationRecord(c); in testIsAlarm() 175 NotificationRecord r = getNotificationRecord(); in testIsAlarm_wrongCategory() [all …]
|
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()
|
D | TimeToLiveHelperTest.java | 73 private NotificationRecord getRecord(String tag, int timeoutAfter) { in getRecord() 83 return new NotificationRecord(mContext, sbn, channel); in getRecord() 96 NotificationRecord r = getRecord("testTimeoutExpires", 1); in testTimeoutExpires() 109 NotificationRecord first = getRecord("testTimeoutFirst", 1); in testTimeoutExpires_twoEntries() 110 NotificationRecord later = getRecord("testTimeoutSecond", 2); in testTimeoutExpires_twoEntries() 129 NotificationRecord later = getRecord("testTimeoutSecond", 2); in testTimeout_earlierEntryAddedSecond() 135 NotificationRecord first = getRecord("testTimeoutFirst", 1); in testTimeout_earlierEntryAddedSecond() 154 NotificationRecord first = getRecord("testTimeoutFirst", 1); in testTimeout_earlierEntryAddedFirst() 155 NotificationRecord later = getRecord("testTimeoutSecond", 2); in testTimeout_earlierEntryAddedFirst() 168 NotificationRecord first = getRecord("testTimeoutFirst", 1); in testTimeout_updateEarliestEntry() [all …]
|
D | NotificationManagerServiceTest.java | 1071 private NotificationRecord generateNotificationRecord(NotificationChannel channel, int id, in generateNotificationRecord() 1077 private NotificationRecord generateNotificationRecord(NotificationChannel channel, int id, in generateNotificationRecord() 1087 return new NotificationRecord(mContext, sbn, channel); in generateNotificationRecord() 1090 private NotificationRecord generateNotificationRecord(NotificationChannel channel) { in generateNotificationRecord() 1094 private NotificationRecord generateNotificationRecord(NotificationChannel channel, in generateNotificationRecord() 1110 return new NotificationRecord(mContext, sbn, channel); in generateNotificationRecord() 1113 private NotificationRecord generateNotificationRecord(NotificationChannel channel, in generateNotificationRecord() 1116 return new NotificationRecord(mContext, sbn, channel); in generateNotificationRecord() 1119 private NotificationRecord generateNotificationRecord(NotificationChannel channel, int userId) { in generateNotificationRecord() 1123 private NotificationRecord generateNotificationRecord(NotificationChannel channel, int id, in generateNotificationRecord() [all …]
|
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()
|
D | VisibilityExtractorTest.java | 69 private NotificationRecord getNotificationRecord(int visibility) { in getNotificationRecord() 81 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecord() 100 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalAllDpmAllChannelAll() 118 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalNoneDpmAllChannelAll() 136 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalSomeDpmAllChannelAll() 155 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalAllDpmNoneChannelAll() 174 NotificationRecord r = getNotificationRecord(VISIBILITY_NO_OVERRIDE); in testGlobalAllDpmSomeChannelAll() 192 NotificationRecord r = getNotificationRecord(VISIBILITY_SECRET); in testGlobalAllDpmAllChannelNone() 210 NotificationRecord r = getNotificationRecord(VISIBILITY_PRIVATE); in testGlobalAllDpmAllChannelSome() 229 NotificationRecord r = getNotificationRecord(VISIBILITY_SECRET); in testGlobalAllDpmSomeChannelNone()
|
D | ImportanceExtractorTest.java | 59 private NotificationRecord getNotificationRecord(NotificationChannel channel) { in getNotificationRecord() 69 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in getNotificationRecord() 85 NotificationRecord r = getNotificationRecord(channel); in testAppPreferenceChannelNone() 102 NotificationRecord r = getNotificationRecord(channel); in testAppPreferenceChannelPreference()
|
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()
|
D | NotificationChannelExtractorTest.java | 87 private NotificationRecord getRecord(NotificationChannel channel, Notification n) { in getRecord() 90 return new NotificationRecord(getContext(), sbn, channel); in getRecord() 100 NotificationRecord r = getRecord(channel, n); in testExtractsUpdatedConversationChannel() 120 NotificationRecord r = getRecord(channel, n); in testInvalidShortcutFlagEnabled_looksUpCorrectNonChannel() 141 NotificationRecord r = getRecord(channel, n); in testInvalidShortcutFlagDisabled_looksUpCorrectChannel() 169 NotificationRecord r = getRecord(channel, n); in testAudioAttributes_callStyleCanUseCallUsage() 188 NotificationRecord r = getRecord(channel, n); in testAudioAttributes_nonCallStyleCannotUseCallUsage() 210 NotificationRecord r = getRecord(channel, n); in testAudioAttributes_alarmCategoryCanUseAlarmUsage() 229 NotificationRecord r = getRecord(channel, n); in testAudioAttributes_nonAlarmCategoryCannotUseAlarmUsage() 250 NotificationRecord r = getRecord(channel, n); in testAudioAttributes_noMediaUsage() [all …]
|
/frameworks/base/services/core/java/com/android/server/notification/ |
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()
|
D | SnoozeHelper.java | 91 private ArrayMap<String, NotificationRecord> mSnoozedNotifications = new ArrayMap<>(); 155 protected Collection<NotificationRecord> getSnoozed(int userId, String pkg) { in getSnoozed() 158 for (NotificationRecord r : mSnoozedNotifications.values()) { in getSnoozed() 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() [all …]
|
D | RankingHelper.java | 50 private final ArrayMap<String, NotificationRecord> mProxyByGroupTmp = new ArrayMap<>(); 110 public void extractSignals(NotificationRecord r) { in extractSignals() 125 public void sort(ArrayList<NotificationRecord> notificationList) { in sort() 145 final NotificationRecord record = notificationList.get(i); in sort() 149 NotificationRecord existingProxy = mProxyByGroupTmp.get(groupKey); in sort() 157 NotificationRecord existingProxy = mProxyByGroupTmp.get(groupKey); in sort() 166 final NotificationRecord record = notificationList.get(i); in sort() 167 NotificationRecord groupProxy = mProxyByGroupTmp.get(record.getGroupKey()); in sort() 205 public int indexOf(ArrayList<NotificationRecord> notificationList, NotificationRecord target) { in indexOf()
|
D | NotificationTimeComparator.java | 23 public class NotificationTimeComparator implements Comparator<NotificationRecord> { 30 public int compare(NotificationRecord left, NotificationRecord right) { in compare()
|
D | NotificationAttentionHelper.java | 364 int buzzBeepBlinkLocked(NotificationRecord record, Signals signals) { in buzzBeepBlinkLocked() 546 private int getPoliteBit(final NotificationRecord record) { in getPoliteBit() 557 private int getPolitenessState(final NotificationRecord record) { in getPolitenessState() 564 boolean isInsistentUpdate(final NotificationRecord record) { in isInsistentUpdate() 576 boolean shouldMuteNotificationLocked(final NotificationRecord record, final Signals signals) { in shouldMuteNotificationLocked() 632 private boolean isLoopingRingtoneNotification(final NotificationRecord playingRecord) { in isLoopingRingtoneNotification() 642 private boolean playSound(final NotificationRecord record, Uri soundUri) { in playSound() 682 private boolean isPoliteNotificationFeatureEnabled(final NotificationRecord record) { in isPoliteNotificationFeatureEnabled() 707 private float getSoundVolume(final NotificationRecord record) { in getSoundVolume() 715 private float getVibrationIntensity(final NotificationRecord record) { in getVibrationIntensity() [all …]
|
D | GlobalSortKeyComparator.java | 25 public class GlobalSortKeyComparator implements Comparator<NotificationRecord> { 29 public int compare(NotificationRecord left, NotificationRecord right) { in compare()
|
D | ZenModeFiltering.java | 139 private static Bundle extras(NotificationRecord record) { in extras() 144 protected void recordCall(NotificationRecord record) { in recordCall() 153 private boolean canRecordBypassDnd(NotificationRecord record, in canRecordBypassDnd() 166 NotificationRecord record) { in shouldIntercept() 291 private static void maybeLogInterceptDecision(NotificationRecord record, boolean intercept, in maybeLogInterceptDecision() 323 private boolean isCritical(NotificationRecord record) { in isCritical() 328 private static boolean shouldInterceptAudience(int source, NotificationRecord record) { in shouldInterceptAudience() 338 protected static boolean isAlarm(NotificationRecord record) { in isAlarm() 343 private static boolean isEvent(NotificationRecord record) { in isEvent() 347 private static boolean isReminder(NotificationRecord record) { in isReminder() [all …]
|