/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/ |
D | CarNotificationDiffTest.java | 65 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 …]
|
D | PreprocessingManagerTest.java | 128 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 …]
|
D | CarNotificationListenerTest.java | 95 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 …]
|
D | CarHeadsUpNotificationManagerTest.java | 102 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 …]
|
D | NotificationUtilsTest.java | 52 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()
|
D | NotificationClickHandlerFactoryTest.java | 80 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()
|
D | NotificationDataManagerTest.java | 55 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()
|
D | NotificationGroupTest.java | 62 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/ |
D | PreprocessingManager.java | 69 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 …]
|
D | CarNotificationListener.java | 66 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 …]
|
D | NotificationGroup.java | 38 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 …]
|
D | CarHeadsUpNotificationManager.java | 68 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 …]
|
D | NotificationDataManager.java | 69 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()
|
D | CarNotificationDiff.java | 111 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()
|
D | NotificationClickHandlerFactory.java | 68 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) {
|
D | AlertEntry.java | 27 public class AlertEntry { class 34 public AlertEntry(StatusBarNotification statusBarNotification) { in AlertEntry() method in AlertEntry 42 protected AlertEntry() {} in AlertEntry() method in AlertEntry
|
D | NotificationUtils.java | 64 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/ |
D | CarNotificationActionsViewTest.java | 40 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/ |
D | CarNotificationBaseViewHolder.java | 32 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()
|
D | CallNotificationViewHolder.java | 23 import com.android.car.notification.AlertEntry; 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody()
|
D | InboxNotificationViewHolder.java | 23 import com.android.car.notification.AlertEntry; 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody()
|
D | NavigationNotificationViewHolder.java | 23 import com.android.car.notification.AlertEntry; 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody()
|
D | BasicNotificationViewHolder.java | 23 import com.android.car.notification.AlertEntry; 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody()
|
D | CarNotificationActionsView.java | 34 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()
|
D | MessageNotificationViewHolder.java | 33 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()
|