Home
last modified time | relevance | path

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

12

/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/
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()
191 mNotification4 = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in sameGroupUniqueIdentifiers_diffNotificationKey_shouldReturnFalse()
208 mNotification4 = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in sameGroupUniqueIdentifiers_sameChildrenNotification_shouldReturnTrue()
303 AlertEntry oldStatusBarNotification = new AlertEntry( in areBundleEqual_sameSize_shouldReturnTrue()
[all …]
DPreprocessingManagerTest.java128 private AlertEntry mLessImportantBackground;
129 private AlertEntry mLessImportantForeground;
130 private AlertEntry mMedia;
131 private AlertEntry mNavigation;
132 private AlertEntry mImportantBackground;
133 private AlertEntry mImportantForeground;
135 private List<AlertEntry> mAlertEntries;
136 private Map<String, AlertEntry> mAlertEntriesMap;
213 List<AlertEntry> unfiltered = mAlertEntries.stream().collect(Collectors.toList()); in onFilter_showLessImportantNotifications_doesNotFilterNotifications()
263 List<AlertEntry> entries = new ArrayList<>(); in onFilter_doShowLessImportantNotifications_filtersCalls()
[all …]
DCarNotificationListenerTest.java95 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isHun_notForCurrentUser_ignoresTheEvent()
107 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isNotHun_notForCurrentUser_ignoresTheEvent()
119 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isHun_isForCurrentUser_addsAlertEntryToDataManager()
142 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isHun_isForAllUsers_addsAlertEntryToDataManager()
166 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isNotHun_isForCurrentUser_addsAlertEntryToDataManager()
191 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForCurrentUser_untracksUnseenNotification()
192 verify(mNotificationDataManager).untrackUnseenNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForCurrentUser_untracksUnseenNotification()
203 verify(mNotificationDataManager).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_isNotHun_isForAllUsers_addsAlertEntryToDataManager()
228 verify(mNotificationDataManager, never()).addNewMessageNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForAllUsers_untracksUnseenNotification()
229 verify(mNotificationDataManager).untrackUnseenNotification(any(AlertEntry.class)); in onNotificationPosted_lowPriority_isForAllUsers_untracksUnseenNotification()
[all …]
DCarHeadsUpNotificationManagerTest.java102 private AlertEntry mAlertEntryMessageHeadsUp;
103 private AlertEntry mAlertEntryNavigationHeadsUp;
104 private AlertEntry mAlertEntryCallHeadsUp;
105 private AlertEntry mAlertEntryInboxHeadsUp;
106 private AlertEntry mAlertEntryWarningHeadsUp;
107 private AlertEntry mAlertEntryEmergencyHeadsUp;
108 private AlertEntry mAlertEntryCarInformationHeadsUp;
109 private Map<String, AlertEntry> mActiveNotifications;
184 mAlertEntryMessageHeadsUp = new AlertEntry( in setup()
187 mAlertEntryNavigationHeadsUp = new AlertEntry( in setup()
[all …]
DNotificationUtilsTest.java52 private AlertEntry mAlertEntry;
64 mAlertEntry = new AlertEntry(mStatusBarNotification); in setup()
204 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_notificationIsARecognizedType_returnsCorrectType()
218 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_notificationHasBigTextAndSummaryText_returnsInbox()
228 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_unrecognizedTypeWithoutBigTextOrSummary_returnsBasic()
DNotificationClickHandlerFactoryTest.java80 private AlertEntry mAlertEntry1;
81 private AlertEntry mAlertEntry2;
82 private AlertEntry mAlertEntryMessageHeadsUp;
125 mAlertEntry1 = new AlertEntry(mStatusBarNotification1); in setUp()
126 mAlertEntry2 = new AlertEntry(mStatusBarNotification2); in setUp()
137 mAlertEntryMessageHeadsUp = new AlertEntry( in setUp()
156 verify(mListener1, never()).onNotificationClicked(anyInt(), any(AlertEntry.class)); in onClickClickHandler_noIntent_returnsImmediately()
185 verify(mListener1).onNotificationClicked(anyInt(), any(AlertEntry.class)); in onClickClickHandler_intentExists_invokesRegisteredClickListeners()
238 verify(mListener1, never()).onNotificationClicked(anyInt(), any(AlertEntry.class)); in onClickActionClickHandler_isReplyAction_doesNotInvokeRegisteredClickListeners()
283 verify(mListener1).onNotificationClicked(anyInt(), any(AlertEntry.class)); in onClickActionClickHandler_notCarCompatibleMessage_invokesRegisteredListeners()
DNotificationDataManagerTest.java55 private AlertEntry mMessageNotification;
56 private AlertEntry mNonMessageNotification;
77 mMessageNotification = new AlertEntry(new StatusBarNotification(PKG_1, OP_PKG, in setup()
80 mNonMessageNotification = new AlertEntry(new StatusBarNotification(PKG_2, OP_PKG, in setup()
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.java69 private Map<String, AlertEntry> mOldNotifications;
110 public void init(Map<String, AlertEntry> notifications, RankingMap rankingMap) { in init()
128 Map<String, AlertEntry> notifications, in process()
148 AlertEntry alertEntry, in updateNotifications()
160 AlertEntry notification = optimizeForDriving(alertEntry); in updateNotifications()
194 boolean shouldFilter(AlertEntry alertEntry, RankingMap rankingMap) { in shouldFilter()
203 protected List<AlertEntry> filter( in filter()
205 List<AlertEntry> notifications, in filter()
222 private boolean isLessImportantForegroundNotification(AlertEntry alertEntry, in isLessImportantForegroundNotification()
243 private boolean isMediaOrNavigationNotification(AlertEntry alertEntry) { in isMediaOrNavigationNotification()
[all …]
DCarNotificationListener.java66 private Map<String, AlertEntry> mActiveNotifications = new HashMap<>();
126 AlertEntry alertEntry = new AlertEntry(sbn); in onNotificationPosted()
139 AlertEntry alertEntry = mActiveNotifications.get(sbn.getKey()); in onNotificationRemoved()
146 alertEntry = new AlertEntry(sbn); in onNotificationRemoved()
155 for (AlertEntry alertEntry : mActiveNotifications.values()) { in onNotificationRankingUpdate()
185 Map<String, AlertEntry> getNotifications() { in getNotifications()
200 Collectors.toMap(StatusBarNotification::getKey, sbn -> new AlertEntry(sbn))); in onListenerConnected()
212 private void notifyNotificationPosted(AlertEntry alertEntry) { in notifyNotificationPosted()
236 public void onStateChange(AlertEntry alertEntry, boolean isHeadsUp) { in onStateChange()
249 private void postNewNotification(AlertEntry alertEntry) { in postNewNotification()
[all …]
DNotificationGroup.java38 private final List<AlertEntry> mNotifications = new ArrayList<>();
42 private AlertEntry mGroupSummaryNotification;
50 public NotificationGroup(AlertEntry alertEntry) { in NotificationGroup()
54 public void addNotification(AlertEntry alertEntry) { in addNotification()
59 void setGroupSummaryNotification(AlertEntry groupSummaryNotification) { in setGroupSummaryNotification()
131 for (AlertEntry notification : mNotifications) { in isDismissible()
145 public List<AlertEntry> getChildNotifications() { in getChildNotifications()
153 public AlertEntry getGroupSummaryNotification() { in getGroupSummaryNotification()
178 for (AlertEntry notification : mNotifications) { in generateChildTitles()
213 public AlertEntry getSingleNotification() { in getSingleNotification()
[all …]
DCarHeadsUpNotificationManager.java68 void onStateChange(AlertEntry alertEntry, boolean isHeadsUp); in onStateChange()
142 AlertEntry alertEntry, in maybeShowHeadsUp()
144 Map<String, AlertEntry> activeNotifications) { in maybeShowHeadsUp()
172 public void maybeRemoveHeadsUp(AlertEntry alertEntry) { in maybeRemoveHeadsUp()
216 private void handleHeadsUpNotificationStateChanged(AlertEntry alertEntry, boolean isHeadsUp) { in handleHeadsUpNotificationStateChanged()
234 private boolean isUpdate(AlertEntry alertEntry) { in isUpdate()
247 private boolean canUpdate(AlertEntry alertEntry) { in canUpdate()
258 private HeadsUpEntry addNewHeadsUpEntry(AlertEntry alertEntry) { in addNewHeadsUpEntry()
296 private void showHeadsUp(AlertEntry alertEntry, in showHeadsUp()
422 private void playSound(AlertEntry alertEntry, in playSound()
[all …]
DNotificationDataManager.java69 private final List<AlertEntry> mVisibleNotifications = new ArrayList<>();
86 void addNewMessageNotification(AlertEntry alertEntry) { in addNewMessageNotification()
102 void untrackUnseenNotification(AlertEntry alertEntry) { in untrackUnseenNotification()
118 for (AlertEntry alertEntry : group.getChildNotifications()) { in updateUnseenNotification()
141 public boolean isMessageNotificationMuted(AlertEntry alertEntry) { in isMessageNotificationMuted()
153 public void toggleMute(AlertEntry alertEntry) { in toggleMute()
180 void setNotificationsAsSeen(List<AlertEntry> alertEntries) { in setNotificationsAsSeen()
182 for (AlertEntry alertEntry : alertEntries) { in setNotificationsAsSeen()
209 public List<AlertEntry> getVisibleNotifications() { in getVisibleNotifications()
DCarNotificationDiff.java111 static boolean sameNotificationKey(AlertEntry oldItem, AlertEntry newItem) { in sameNotificationKey()
127 static boolean sameNotificationKeyAndFlags(AlertEntry oldItem, AlertEntry newItem) { in sameNotificationKeyAndFlags()
158 List<AlertEntry> oldChildNotifications = oldItem.getChildNotifications(); in areContentsTheSame()
159 List<AlertEntry> newChildNotifications = newItem.getChildNotifications(); in areContentsTheSame()
162 AlertEntry oldNotification = oldChildNotifications.get(i); in areContentsTheSame()
163 AlertEntry newNotification = newChildNotifications.get(i); in areContentsTheSame()
179 private boolean sameNotificationContent(AlertEntry oldItem, AlertEntry newItem) { in sameNotificationContent()
DNotificationClickHandlerFactory.java68 void onNotificationClicked(int launchResult, AlertEntry alertEntry); in onNotificationClicked()
114 public View.OnClickListener getClickHandler(AlertEntry alertEntry) { in getClickHandler()
158 public View.OnClickListener getActionClickHandler(AlertEntry alertEntry, int index) { in getActionClickHandler()
207 public View.OnClickListener getPlayClickHandler(AlertEntry messageNotification) {
236 Button muteButton, AlertEntry messageNotification) {
274 public View.OnClickListener getDismissHandler(AlertEntry alertEntry) {
311 AlertEntry summaryNotification = notificationGroup.getGroupSummaryNotification();
334 private void handleNotificationClicked(int launceResult, AlertEntry alertEntry) {
339 private void clearNotification(AlertEntry alertEntry) {
396 private boolean shouldAutoCancel(AlertEntry alertEntry) {
DAlertEntry.java27 public class AlertEntry { class
34 public AlertEntry(StatusBarNotification statusBarNotification) { in AlertEntry() method in AlertEntry
42 protected AlertEntry() {} in AlertEntry() method in AlertEntry
DNotificationUtils.java64 public static boolean isSystemPrivilegedOrPlatformKey(Context context, AlertEntry alertEntry) { in isSystemPrivilegedOrPlatformKey()
78 public static boolean isSystemOrPlatformKey(Context context, AlertEntry alertEntry) { in isSystemOrPlatformKey()
110 public static CarNotificationTypeItem getNotificationViewType(AlertEntry alertEntry) { in getNotificationViewType()
160 AlertEntry alertEntry, boolean checkForPrivilegedApp) { in isSystemPrivilegedOrPlatformKeyInner()
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/template/
DCarNotificationActionsViewTest.java40 import com.android.car.notification.AlertEntry;
73 private AlertEntry mAlertEntryMessageHeadsUp;
100 mAlertEntryMessageHeadsUp = new AlertEntry( in setup()
105 .getPlayClickHandler(any(AlertEntry.class))) in setup()
108 .getMuteClickHandler(any(Button.class), any(AlertEntry.class))) in setup()
111 .getActionClickHandler(any(AlertEntry.class), anyInt())) in setup()
132 new AlertEntry(mStatusBarNotification)); in onBind_noAction_doesNotCreateButtons()
269 new AlertEntry(mStatusBarNotification)); in onBind_actionExists_notCarCompatibleMessage_buttonIsVisible()
281 new AlertEntry(mStatusBarNotification)); in onBind_actionExists_notCarCompatibleMessage_buttonShowsActionTitle()
293 new AlertEntry(mStatusBarNotification)); in onBind_actionExists_notCarCompatibleMessage_hasIntent_buttonHasClickListener()
[all …]
/packages/apps/Car/Notification/src/com/android/car/notification/template/
DCarNotificationBaseViewHolder.java32 import com.android.car.notification.AlertEntry;
88 private AlertEntry mAlertEntry;
148 public void bind(AlertEntry alertEntry, boolean isInGroup, boolean isHeadsUp) { in bind()
313 public AlertEntry getAlertEntry() { in getAlertEntry()
329 void updateDismissButton(AlertEntry alertEntry, boolean isHeadsUp) { in updateDismissButton()
402 View.OnClickListener getDismissHandler(AlertEntry alertEntry) { in getDismissHandler()
DCallNotificationViewHolder.java23 import com.android.car.notification.AlertEntry;
50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
61 private void bindBody(AlertEntry alertEntry) { in bindBody()
DInboxNotificationViewHolder.java23 import com.android.car.notification.AlertEntry;
50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
61 private void bindBody(AlertEntry alertEntry) { in bindBody()
DNavigationNotificationViewHolder.java23 import com.android.car.notification.AlertEntry;
50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
61 private void bindBody(AlertEntry alertEntry) { in bindBody()
DBasicNotificationViewHolder.java23 import com.android.car.notification.AlertEntry;
50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
61 private void bindBody(AlertEntry alertEntry) { in bindBody()
DCarNotificationActionsView.java34 import com.android.car.notification.AlertEntry;
113 public void bind(NotificationClickHandlerFactory clickHandlerFactory, AlertEntry alertEntry) { in bind()
196 AlertEntry alertEntry) { in createPlayButton()
211 AlertEntry alertEntry) { in createMuteButton()
DMessageNotificationViewHolder.java33 import com.android.car.notification.AlertEntry;
82 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind()
94 public void bindRestricted(AlertEntry alertEntry, boolean isInGroup, boolean isHeadsUp) { in bindRestricted()
104 private void bindBody(AlertEntry alertEntry, boolean isInGroup, boolean isRestricted, in bindBody()

12