Home
last modified time | relevance | path

Searched refs:AlertEntry (Results 1 – 25 of 45) sorted by relevance

12

/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/
DCarHeadsUpNotificationQueueTest.java94 private ArgumentCaptor<AlertEntry> mAlertEntryArg;
116 new ArrayList<>(Collections.singletonList(mock(AlertEntry.class)))); in setup()
136 AlertEntry alertEntry1 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_postTimeOfHeadsUp()
138 AlertEntry alertEntry2 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_postTimeOfHeadsUp()
140 AlertEntry alertEntry3 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_postTimeOfHeadsUp()
142 AlertEntry alertEntry4 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_postTimeOfHeadsUp()
144 AlertEntry alertEntry5 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_postTimeOfHeadsUp()
170 AlertEntry alertEntry1 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_categoriesOfHeadsUp()
172 AlertEntry alertEntry2 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_categoriesOfHeadsUp()
174 AlertEntry alertEntry3 = new AlertEntry(generateMockStatusBarNotification( in addToQueue_prioritises_categoriesOfHeadsUp()
[all …]
DPreprocessingManagerTest.java153 private AlertEntry mLessImportantBackground;
154 private AlertEntry mLessImportantForeground;
155 private AlertEntry mMedia;
156 private AlertEntry mNavigation;
157 private AlertEntry mImportantBackground;
158 private AlertEntry mImportantForeground;
159 private AlertEntry mImportantForeground2;
160 private AlertEntry mImportantForeground3;
161 private AlertEntry mImportantForeground4;
162 private AlertEntry mImportantForeground5;
[all …]
DCarNotificationDiffTest.java65 private AlertEntry mNotification1;
66 private AlertEntry mNotification2;
67 private AlertEntry mNotification3;
68 private AlertEntry mNotification4;
98 mNotification1 = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in setupBaseActivityAndLayout()
101 mNotification2 = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in setupBaseActivityAndLayout()
104 mNotification3 = new AlertEntry(new StatusBarNotification(PKG_2, OP_PKG, in setupBaseActivityAndLayout()
201 mNotification4 = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in sameGroupUniqueIdentifiers_diffNotificationKey_shouldReturnFalse()
218 mNotification4 = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in sameGroupUniqueIdentifiers_sameChildrenNotification_shouldReturnTrue()
313 AlertEntry oldStatusBarNotification = new AlertEntry( in areBundleEqual_sameSize_shouldReturnTrue()
[all …]
DCarNotificationListenerTest.java120 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isHun_notForCurrentUser_ignoresTheEvent()
132 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isNotHun_notForCurrentUser_ignoresTheEvent()
144 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isHun_isForCurrentUser_addsAlertEntryToDataManager()
167 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isHun_isForAllUsers_addsAlertEntryToDataManager()
201 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isNotHun_isForCurrentUser_addsAlertEntryToDataManager()
226 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForCurrentUser_untracksUnseenNotification()
227 verify(mNotificationDataManager).untrackUnseenNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForCurrentUser_untracksUnseenNotification()
238 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isNotHun_isForAllUsers_addsAlertEntryToDataManager()
263 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForAllUsers_untracksUnseenNotification()
264 verify(mNotificationDataManager).untrackUnseenNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForAllUsers_untracksUnseenNotification()
[all …]
DCarHeadsUpNotificationManagerTest.java118 private AlertEntry mAlertEntryMessageHeadsUp;
119 private AlertEntry mAlertEntryNavigationHeadsUp;
120 private AlertEntry mAlertEntryCallHeadsUp;
121 private AlertEntry mAlertEntryInboxHeadsUp;
122 private AlertEntry mAlertEntryWarningHeadsUp;
123 private AlertEntry mAlertEntryEmergencyHeadsUp;
124 private AlertEntry mAlertEntryCarInformationHeadsUp;
125 private Map<String, AlertEntry> mActiveNotifications;
204 mAlertEntryMessageHeadsUp = new AlertEntry( in setup()
207 mAlertEntryNavigationHeadsUp = new AlertEntry( in setup()
[all …]
DNotificationUtilsTest.java61 private AlertEntry mAlertEntry;
79 mAlertEntry = new AlertEntry(mStatusBarNotification); in setup()
228 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_notificationIsARecognizedType_returnsCorrectType()
242 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_notificationHasBigTextAndSummaryText_returnsInbox()
252 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_unrecognizedTypeWithoutBigTextOrSummary_returnsBasic()
DNotificationClickHandlerFactoryTest.java82 private AlertEntry mAlertEntry1;
83 private AlertEntry mAlertEntry2;
84 private AlertEntry mAlertEntryMessageHeadsUp;
85 private AlertEntry mAlertEntryMessageWithMuteAction;
131 mAlertEntry1 = new AlertEntry(mStatusBarNotification1); in setUp()
132 mAlertEntry2 = new AlertEntry(mStatusBarNotification2); in setUp()
153 mAlertEntryMessageHeadsUp = new AlertEntry( in setUp()
157 mAlertEntryMessageWithMuteAction = new AlertEntry( in setUp()
184 verify(mListener1, never()).onNotificationClicked(anyInt(), any(AlertEntry.class)); in onClickClickHandler_noIntent_returnsImmediately()
213 verify(mListener1).onNotificationClicked(anyInt(), any(AlertEntry.class)); in onClickClickHandler_intentExists_invokesRegisteredClickListeners()
[all …]
DNotificationGroupTest.java62 private AlertEntry mNotification1;
63 private AlertEntry mNotification2;
74 mNotification1 = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in setup()
77 mNotification2 = new AlertEntry(new StatusBarNotification(PKG_2, OP_PKG, in setup()
/packages/apps/Car/Notification/src/com/android/car/notification/
DPreprocessingManager.java78 private Map<String, AlertEntry> mOldNotifications;
136 public void init(Map<String, AlertEntry> notifications, RankingMap rankingMap) { in init()
153 Map<String, AlertEntry> notifications, RankingMap rankingMap) { in process()
171 AlertEntry alertEntry, in updateNotifications()
183 AlertEntry notification = optimizeForDriving(alertEntry); in updateNotifications()
211 boolean shouldFilter(AlertEntry alertEntry, RankingMap rankingMap) { in shouldFilter()
220 protected List<AlertEntry> filter( in filter()
222 List<AlertEntry> notifications, in filter()
247 private boolean isLessImportantForegroundNotification(AlertEntry alertEntry, in isLessImportantForegroundNotification()
287 private boolean isMediaOrNavigationNotification(AlertEntry alertEntry) { in isMediaOrNavigationNotification()
[all …]
DNotificationDataManager.java76 private final ConcurrentHashMap.KeySetView<AlertEntry, Boolean> mVisibleNotifications =
109 void addNewMessageNotification(AlertEntry alertEntry) { in addNewMessageNotification()
124 void untrackUnseenNotification(AlertEntry alertEntry) { in untrackUnseenNotification()
132 List<AlertEntry> alertEntries = new ArrayList<>(); in updateUnseenNotificationGroups()
144 void updateUnseenAlertEntries(List<AlertEntry> alertEntries) { in updateUnseenAlertEntries()
150 for (AlertEntry alertEntry : alertEntries) { in updateUnseenAlertEntries()
166 boolean isNotificationSeen(AlertEntry alertEntry) { in isNotificationSeen()
174 public boolean isMessageNotificationMuted(AlertEntry alertEntry) { in isMessageNotificationMuted()
187 public void toggleMute(AlertEntry alertEntry) { in toggleMute()
216 void setVisibleNotificationsAsSeen(List<AlertEntry> alertEntries) { in setVisibleNotificationsAsSeen()
[all …]
DNotificationGroup.java42 private final List<AlertEntry> mNotifications = new ArrayList<>();
47 private AlertEntry mGroupSummaryNotification;
58 public NotificationGroup(AlertEntry alertEntry) { in NotificationGroup()
67 for (AlertEntry alertEntry : group.getChildNotifications()) { in NotificationGroup()
83 public void addNotification(AlertEntry alertEntry) { in addNotification()
93 public boolean removeNotification(AlertEntry alertEntry) { in removeNotification()
108 public void setGroupSummaryNotification(AlertEntry groupSummaryNotification) { in setGroupSummaryNotification()
228 for (AlertEntry notification : mNotifications) { in isDismissible()
242 public List<AlertEntry> getChildNotifications() { in getChildNotifications()
250 public AlertEntry getGroupSummaryNotification() { in getGroupSummaryNotification()
[all …]
DCarHeadsUpNotificationManager.java77 void onStateChange(AlertEntry alertEntry, HeadsUpState headsUpState); in onStateChange()
178 public void showAsHeadsUp(AlertEntry alertEntry, in CarHeadsUpNotificationManager()
187 public void removedFromHeadsUpQueue(AlertEntry alertEntry) { in CarHeadsUpNotificationManager()
193 public void dismissHeadsUp(@Nullable AlertEntry alertEntry) { in CarHeadsUpNotificationManager()
200 public List<AlertEntry> getActiveHeadsUpNotifications() { in CarHeadsUpNotificationManager()
236 AlertEntry alertEntry, in maybeShowHeadsUp()
238 Map<String, AlertEntry> activeNotifications) { in maybeShowHeadsUp()
283 public void maybeRemoveHeadsUp(AlertEntry alertEntry) { in maybeRemoveHeadsUp()
310 for (AlertEntry alertEntry : mActiveHeadsUpNotifications.values()) { in clearCache()
315 private void scheduleRemoveHeadsUp(AlertEntry alertEntry) { in scheduleRemoveHeadsUp()
[all …]
DCarNotificationListener.java73 private ConcurrentMap<String, AlertEntry> mActiveNotifications = new ConcurrentHashMap<>();
150 AlertEntry alertEntry = new AlertEntry(sbn); in onNotificationPosted()
175 AlertEntry alertEntry = mActiveNotifications.get(sbn.getKey()); in onNotificationRemoved()
182 alertEntry = new AlertEntry(sbn); in onNotificationRemoved()
192 for (AlertEntry alertEntry : mActiveNotifications.values()) { in onNotificationRankingUpdate()
202 private boolean updateOverrideGroupKey(AlertEntry alertEntry) { in updateOverrideGroupKey()
237 Map<String, AlertEntry> getNotifications() { in getNotifications()
252 Collectors.toConcurrentMap(StatusBarNotification::getKey, AlertEntry::new)); in onListenerConnected()
288 private void notifyNotificationPosted(AlertEntry alertEntry) { in notifyNotificationPosted()
318 public void onStateChange(AlertEntry alertEntry, in onStateChange()
[all …]
DCarNotificationDiff.java125 static boolean sameNotificationKey(AlertEntry oldItem, AlertEntry newItem) { in sameNotificationKey()
141 static boolean sameNotificationKeyAndFlags(AlertEntry oldItem, AlertEntry newItem) { in sameNotificationKeyAndFlags()
172 List<AlertEntry> oldChildNotifications = oldItem.getChildNotifications(); in areContentsTheSame()
173 List<AlertEntry> newChildNotifications = newItem.getChildNotifications(); in areContentsTheSame()
176 AlertEntry oldNotification = oldChildNotifications.get(i); in areContentsTheSame()
177 AlertEntry newNotification = newChildNotifications.get(i); in areContentsTheSame()
193 private boolean sameNotificationContent(AlertEntry oldItem, AlertEntry newItem) { in sameNotificationContent()
DCarHeadsUpNotificationQueue.java77 private final Map<String, AlertEntry> mKeyToAlertEntryMap;
163 public void addToQueue(AlertEntry alertEntry, in addToQueue()
182 public boolean removeFromQueue(AlertEntry alertEntry) { in removeFromQueue()
238 AlertEntry alertEntry; in triggerCallback()
301 public void onStateChange(AlertEntry alertEntry, in onStateChange()
353 void showAsHeadsUp(AlertEntry alertEntry, in showAsHeadsUp()
359 void removedFromHeadsUpQueue(AlertEntry alertEntry); in removedFromHeadsUpQueue()
366 void dismissHeadsUp(@Nullable AlertEntry alertEntry); in dismissHeadsUp()
371 List<AlertEntry> getActiveHeadsUpNotifications(); in getActiveHeadsUpNotifications()
379 private final Map<String, AlertEntry> mKeyToAlertEntryMap;
[all …]
DNotificationClickHandlerFactory.java71 void onNotificationClicked(int launchResult, AlertEntry alertEntry); in onNotificationClicked()
102 public View.OnClickListener getClickHandler(AlertEntry alertEntry) { in getClickHandler()
137 public View.OnClickListener getActionClickHandler(AlertEntry alertEntry, int index) { in getActionClickHandler()
186 public View.OnClickListener getPlayClickHandler(AlertEntry messageNotification) {
220 public View.OnClickListener getReplyClickHandler(AlertEntry messageNotification) {
254 CarNotificationActionButton muteButton, AlertEntry messageNotification,
303 public View.OnClickListener getDismissHandler(AlertEntry alertEntry) {
347 AlertEntry summaryNotification = notificationGroup.getGroupSummaryNotification();
370 private void handleNotificationClicked(int launchResult, AlertEntry alertEntry) {
375 private void clearNotification(AlertEntry alertEntry) {
[all …]
DAlertEntry.java27 public class AlertEntry { class
34 public AlertEntry(StatusBarNotification statusBarNotification) { in AlertEntry() method in AlertEntry
42 protected AlertEntry() {} in AlertEntry() method in AlertEntry
45 public AlertEntry(StatusBarNotification statusBarNotification, long postTime) { in AlertEntry() method in AlertEntry
DNotificationUtils.java67 public static boolean isSystemPrivilegedOrPlatformKey(Context context, AlertEntry alertEntry) { in isSystemPrivilegedOrPlatformKey()
81 public static boolean isSystemOrPlatformKey(Context context, AlertEntry alertEntry) { in isSystemOrPlatformKey()
113 public static CarNotificationTypeItem getNotificationViewType(AlertEntry alertEntry) { in getNotificationViewType()
177 AlertEntry alertEntry, boolean checkForPrivilegedApp) { in isSystemPrivilegedOrPlatformKeyInner()
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/template/
DCarNotificationActionsViewTest.java46 import com.android.car.notification.AlertEntry;
79 private AlertEntry mMessageCategoryAlertEntry;
113 mMessageCategoryAlertEntry = new AlertEntry( in setup()
120 .getPlayClickHandler(any(AlertEntry.class))) in setup()
123 .getReplyClickHandler(any(AlertEntry.class))) in setup()
126 .getMuteClickHandler(any(CarNotificationActionButton.class), any(AlertEntry.class), in setup()
130 .getActionClickHandler(any(AlertEntry.class), anyInt())) in setup()
153 new AlertEntry(mStatusBarNotification)); in onBind_noAction_doesNotCreateButtons()
354 new AlertEntry(mStatusBarNotification)); in onBind_actionExists_notCarCompatibleMessage_buttonIsVisible()
366 new AlertEntry(mStatusBarNotification)); in onBind_actionExists_notCarCompatibleMessage_buttonShowsActionTitle()
[all …]
DGroupNotificationViewHolderTest.java38 import com.android.car.notification.AlertEntry;
193 AlertEntry groupSummaryAlertEntry = new AlertEntry( in getNotificationGroup()
204 AlertEntry alertEntry = new AlertEntry( in getNotificationGroup()
/packages/apps/Car/Notification/src/com/android/car/notification/template/
DNavigationNotificationViewHolder.java22 import com.android.car.notification.AlertEntry;
48 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
59 private void bindBody(AlertEntry alertEntry) { in bindBody()
DInboxNotificationViewHolder.java22 import com.android.car.notification.AlertEntry;
49 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
60 private void bindBody(AlertEntry alertEntry) { in bindBody()
DCallNotificationViewHolder.java22 import com.android.car.notification.AlertEntry;
48 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
59 private void bindBody(AlertEntry alertEntry) { in bindBody()
DBasicNotificationViewHolder.java22 import com.android.car.notification.AlertEntry;
48 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
59 private void bindBody(AlertEntry alertEntry) { in bindBody()
DCarNotificationBaseViewHolder.java32 import com.android.car.notification.AlertEntry;
104 private AlertEntry mAlertEntry;
177 public void bind(AlertEntry alertEntry, boolean isInGroup, boolean isHeadsUp, boolean isSeen) { in bind()
368 public AlertEntry getAlertEntry() { in getAlertEntry()
384 void updateDismissButton(AlertEntry alertEntry, boolean isHeadsUp) { in updateDismissButton()
464 View.OnClickListener getDismissHandler(AlertEntry alertEntry) { in getDismissHandler()

12