/packages/apps/Car/Notification/src/com/android/car/notification/ |
D | CarHeadsUpNotificationManager.java | 68 void onStateChange(AlertEntry alertEntry, boolean isHeadsUp); in onStateChange() argument 120 (launchResult, alertEntry) -> dismissHun(alertEntry)); in CarHeadsUpNotificationManager() 142 AlertEntry alertEntry, in maybeShowHeadsUp() argument 145 if (!shouldShowHeadsUp(alertEntry, rankingMap)) { in maybeShowHeadsUp() 149 alertEntry.getKey()); in maybeShowHeadsUp() 154 alertEntry) in maybeShowHeadsUp() 156 dismissHun(alertEntry); in maybeShowHeadsUp() 160 if (!activeNotifications.containsKey(alertEntry.getKey()) || canUpdate(alertEntry) in maybeShowHeadsUp() 161 || alertAgain(alertEntry.getNotification())) { in maybeShowHeadsUp() 162 showHeadsUp(mPreprocessingManager.optimizeForDriving(alertEntry), in maybeShowHeadsUp() [all …]
|
D | CarNotificationListener.java | 126 AlertEntry alertEntry = new AlertEntry(sbn); in onNotificationPosted() local 128 notifyNotificationPosted(alertEntry); in onNotificationPosted() 139 AlertEntry alertEntry = mActiveNotifications.get(sbn.getKey()); in onNotificationRemoved() local 141 if (alertEntry != null) { in onNotificationRemoved() 142 mActiveNotifications.remove(alertEntry.getKey()); in onNotificationRemoved() 146 alertEntry = new AlertEntry(sbn); in onNotificationRemoved() 149 removeNotification(alertEntry); in onNotificationRemoved() 155 for (AlertEntry alertEntry : mActiveNotifications.values()) { in onNotificationRankingUpdate() 156 if (!mRankingMap.getRanking(alertEntry.getKey(), mTemporaryRanking)) { in onNotificationRankingUpdate() 160 alertEntry.getStatusBarNotification().getOverrideGroupKey(); in onNotificationRankingUpdate() [all …]
|
D | NotificationDataManager.java | 86 void addNewMessageNotification(AlertEntry alertEntry) { in addNewMessageNotification() argument 88 alertEntry.getStatusBarNotification())) { in addNewMessageNotification() 90 .putIfAbsent(alertEntry.getKey(), /* muteState= */ false); in addNewMessageNotification() 92 if (mUnseenNotificationMap.containsKey(alertEntry.getKey())) { in addNewMessageNotification() 93 mUnseenNotificationMap.put(alertEntry.getKey(), true); in addNewMessageNotification() 102 void untrackUnseenNotification(AlertEntry alertEntry) { in untrackUnseenNotification() argument 103 if (mUnseenNotificationMap.containsKey(alertEntry.getKey())) { in untrackUnseenNotification() 104 mUnseenNotificationMap.remove(alertEntry.getKey()); in untrackUnseenNotification() 118 for (AlertEntry alertEntry : group.getChildNotifications()) { in updateUnseenNotification() 120 mUnseenNotificationMap.putIfAbsent(alertEntry.getKey(), true); in updateUnseenNotification() [all …]
|
D | NotificationClickHandlerFactory.java | 68 void onNotificationClicked(int launchResult, AlertEntry alertEntry); in onNotificationClicked() argument 114 public View.OnClickListener getClickHandler(AlertEntry alertEntry) { in getClickHandler() argument 116 Notification notification = alertEntry.getNotification(); in getClickHandler() 135 alertEntry.getKey(), in getClickHandler() 138 mBarService.onNotificationClick(alertEntry.getKey(), in getClickHandler() 140 if (shouldAutoCancel(alertEntry)) { in getClickHandler() 141 clearNotification(alertEntry); in getClickHandler() 146 handleNotificationClicked(result, alertEntry); in getClickHandler() 158 public View.OnClickListener getActionClickHandler(AlertEntry alertEntry, int index) { in getActionClickHandler() argument 160 Notification notification = alertEntry.getNotification(); in getActionClickHandler() [all …]
|
D | PreprocessingManager.java | 148 AlertEntry alertEntry, in updateNotifications() argument 154 mOldNotifications.remove(alertEntry.getKey()); in updateNotifications() 160 AlertEntry notification = optimizeForDriving(alertEntry); in updateNotifications() 171 additionalGroupAndRank((alertEntry), newRankingMap)); in updateNotifications() 194 boolean shouldFilter(AlertEntry alertEntry, RankingMap rankingMap) { in shouldFilter() argument 195 return isLessImportantForegroundNotification(alertEntry, rankingMap) in shouldFilter() 196 || isMediaOrNavigationNotification(alertEntry); in shouldFilter() 209 notifications.removeIf(alertEntry -> shouldFilter(alertEntry, rankingMap)); in filter() 216 notifications.removeIf(alertEntry -> Notification.CATEGORY_CALL.equals( in filter() 217 alertEntry.getNotification().category)); in filter() [all …]
|
D | NotificationUtils.java | 64 public static boolean isSystemPrivilegedOrPlatformKey(Context context, AlertEntry alertEntry) { in isSystemPrivilegedOrPlatformKey() argument 65 return isSystemPrivilegedOrPlatformKeyInner(context, alertEntry, in isSystemPrivilegedOrPlatformKey() 78 public static boolean isSystemOrPlatformKey(Context context, AlertEntry alertEntry) { in isSystemOrPlatformKey() argument 79 return isSystemPrivilegedOrPlatformKeyInner(context, alertEntry, in isSystemOrPlatformKey() 110 public static CarNotificationTypeItem getNotificationViewType(AlertEntry alertEntry) { in getNotificationViewType() argument 111 String category = alertEntry.getNotification().category; in getNotificationViewType() 130 Bundle extras = alertEntry.getNotification().extras; in getNotificationViewType() 160 AlertEntry alertEntry, boolean checkForPrivilegedApp) { in isSystemPrivilegedOrPlatformKeyInner() argument 161 PackageInfo packageInfo = getPackageInfo(context, alertEntry.getStatusBarNotification()); in isSystemPrivilegedOrPlatformKeyInner()
|
D | NotificationGroup.java | 50 public NotificationGroup(AlertEntry alertEntry) { in NotificationGroup() argument 51 addNotification(alertEntry); in NotificationGroup() 54 public void addNotification(AlertEntry alertEntry) { in addNotification() argument 55 assertSameGroupKey(alertEntry.getStatusBarNotification().getGroupKey()); in addNotification() 56 mNotifications.add(alertEntry); in addNotification()
|
D | CarNotificationItemTouchListener.java | 129 for (AlertEntry alertEntry in CarNotificationItemTouchListener() 131 clearNotification(alertEntry); in CarNotificationItemTouchListener() 449 private void clearNotification(AlertEntry alertEntry) { in clearNotification() argument 453 alertEntry.getKey(), in clearNotification() 459 alertEntry.getStatusBarNotification().getPackageName(), in clearNotification() 460 alertEntry.getStatusBarNotification().getUser().getIdentifier(), in clearNotification() 461 alertEntry.getStatusBarNotification().getKey(), in clearNotification()
|
D | NotificationViewController.java | 123 boolean showLessImportantNotifications, int what, AlertEntry alertEntry) { in updateNotifications() argument 125 if (mPreprocessingManager.shouldFilter(alertEntry, in updateNotifications() 134 alertEntry, in updateNotifications()
|
D | CarNotificationViewAdapter.java | 162 AlertEntry alertEntry = notificationGroup.getSingleNotification(); in onBindViewHolderImpl() local 167 .bindRestricted(alertEntry, /* isInGroup= */ false, /* isHeadsUp= */false); in onBindViewHolderImpl() 169 carNotificationTypeItem.bind(alertEntry, false, (CarNotificationBaseViewHolder) holder); in onBindViewHolderImpl()
|
D | CarNotificationTypeItem.java | 162 public void bind(AlertEntry alertEntry, boolean isHeadsUp, in bind() argument 164 holder.bind(alertEntry, mIsInGroup, isHeadsUp); in bind()
|
/packages/apps/Car/Notification/src/com/android/car/notification/template/ |
D | MessageNotificationViewHolder.java | 82 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() argument 84 super.bind(alertEntry, isInGroup, isHeadsUp); in bind() 85 bindBody(alertEntry, isInGroup, /* isRestricted= */ false, isHeadsUp); in bind() 86 mHeaderView.bind(alertEntry, isInGroup); in bind() 87 mActionsView.bind(mClickHandlerFactory, alertEntry); in bind() 94 public void bindRestricted(AlertEntry alertEntry, boolean isInGroup, boolean isHeadsUp) { in bindRestricted() argument 95 super.bind(alertEntry, isInGroup, isHeadsUp); in bindRestricted() 96 bindBody(alertEntry, isInGroup, /* isRestricted= */ true, isHeadsUp); in bindRestricted() 97 mHeaderView.bind(alertEntry, isInGroup); in bindRestricted() 98 mActionsView.bind(mClickHandlerFactory, alertEntry); in bindRestricted() [all …]
|
D | CarNotificationActionsView.java | 113 public void bind(NotificationClickHandlerFactory clickHandlerFactory, AlertEntry alertEntry) { in bind() argument 114 Notification notification = alertEntry.getNotification(); in bind() 121 alertEntry.getStatusBarNotification())) { in bind() 125 createPlayButton(clickHandlerFactory, alertEntry); in bind() 127 createMuteButton(clickHandlerFactory, alertEntry); in bind() 140 button.setOnClickListener(clickHandlerFactory.getActionClickHandler(alertEntry, i)); in bind() 196 AlertEntry alertEntry) { in createPlayButton() argument 203 clickHandlerFactory.getPlayClickHandler(alertEntry)); in createPlayButton() 211 AlertEntry alertEntry) { in createMuteButton() argument 217 button.setText((manager != null && manager.isMessageNotificationMuted(alertEntry)) in createMuteButton() [all …]
|
D | CallNotificationViewHolder.java | 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() argument 52 super.bind(alertEntry, isInGroup, isHeadsUp); in bind() 53 bindBody(alertEntry); in bind() 54 mHeaderView.bind(alertEntry, isInGroup); in bind() 55 mActionsView.bind(mClickHandlerFactory, alertEntry); in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody() argument 62 Notification notification = alertEntry.getNotification(); in bindBody()
|
D | InboxNotificationViewHolder.java | 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() argument 52 super.bind(alertEntry, isInGroup, isHeadsUp); in bind() 53 bindBody(alertEntry); in bind() 54 mHeaderView.bind(alertEntry, isInGroup); in bind() 55 mActionsView.bind(mClickHandlerFactory, alertEntry); in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody() argument 62 Notification notification = alertEntry.getNotification(); in bindBody()
|
D | NavigationNotificationViewHolder.java | 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() argument 52 super.bind(alertEntry, isInGroup, isHeadsUp); in bind() 53 bindBody(alertEntry); in bind() 54 mHeaderView.bind(alertEntry, isInGroup); in bind() 55 mActionsView.bind(mClickHandlerFactory, alertEntry); in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody() argument 62 Notification notification = alertEntry.getNotification(); in bindBody()
|
D | BasicNotificationViewHolder.java | 50 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() argument 52 super.bind(alertEntry, isInGroup, isHeadsUp); in bind() 53 bindBody(alertEntry); in bind() 54 mHeaderView.bind(alertEntry, isInGroup); in bind() 55 mActionsView.bind(mClickHandlerFactory, alertEntry); in bind() 61 private void bindBody(AlertEntry alertEntry) { in bindBody() argument 62 Notification notification = alertEntry.getNotification(); in bindBody()
|
D | ProgressNotificationViewHolder.java | 60 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() argument 62 super.bind(alertEntry, isInGroup, isHeadsUp); in bind() 63 bindBody(alertEntry); in bind() 64 mHeaderView.bind(alertEntry, isInGroup); in bind() 65 mActionsView.bind(mClickHandlerFactory, alertEntry); in bind() 71 private void bindBody(AlertEntry alertEntry) { in bindBody() argument 72 Notification notification = alertEntry.getNotification(); in bindBody()
|
D | CarNotificationBaseViewHolder.java | 148 public void bind(AlertEntry alertEntry, boolean isInGroup, boolean isHeadsUp) { in bind() argument 150 mAlertEntry = alertEntry; in bind() 154 mInnerView.setOnClickListener(mClickHandlerFactory.getClickHandler(alertEntry)); in bind() 156 mCardView.setOnClickListener(mClickHandlerFactory.getClickHandler(alertEntry)); in bind() 158 updateDismissButton(alertEntry, isHeadsUp); in bind() 329 void updateDismissButton(AlertEntry alertEntry, boolean isHeadsUp) { in updateDismissButton() argument 345 mDismissButton.setOnClickListener(getDismissHandler(alertEntry)); in updateDismissButton() 402 View.OnClickListener getDismissHandler(AlertEntry alertEntry) { in getDismissHandler() argument 403 return mClickHandlerFactory.getDismissHandler(alertEntry); in getDismissHandler()
|
D | EmergencyNotificationViewHolder.java | 62 public void bind(AlertEntry alertEntry, boolean isInGroup, in bind() argument 64 super.bind(alertEntry, isInGroup, isHeadsUp); in bind() 66 Notification notification = alertEntry.getNotification(); in bind() 69 mHeaderView.bind(alertEntry, isInGroup); in bind() 70 mActionsView.bind(mClickHandlerFactory, alertEntry); in bind()
|
D | CarNotificationHeaderView.java | 111 public void bind(AlertEntry alertEntry, boolean isInGroup) { in bind() argument 118 Notification notification = alertEntry.getNotification(); in bind() 119 StatusBarNotification sbn = alertEntry.getStatusBarNotification(); in bind()
|
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/ |
D | NotificationUtilsTest.java | 204 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_notificationIsARecognizedType_returnsCorrectType() local 205 assertThat(NotificationUtils.getNotificationViewType(alertEntry)).isEqualTo(typeItem); in onGetNotificationViewType_notificationIsARecognizedType_returnsCorrectType() 218 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_notificationHasBigTextAndSummaryText_returnsInbox() local 220 assertThat(NotificationUtils.getNotificationViewType(alertEntry)).isEqualTo( in onGetNotificationViewType_notificationHasBigTextAndSummaryText_returnsInbox() 228 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onGetNotificationViewType_unrecognizedTypeWithoutBigTextOrSummary_returnsBasic() local 230 assertThat(NotificationUtils.getNotificationViewType(alertEntry)).isEqualTo( in onGetNotificationViewType_unrecognizedTypeWithoutBigTextOrSummary_returnsBasic()
|
D | CarNotificationListenerTest.java | 245 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onStateChange_hunNoLongerHun_notifiesHandler() local 246 mCarNotificationListener.onStateChange(alertEntry, /* isHeadsUp= */ false); in onStateChange_hunNoLongerHun_notifiesHandler() 264 AlertEntry alertEntry = new AlertEntry(mStatusBarNotification); in onNotificationRemoved_notificationPreviouslyAdded_removesNotification() local 265 mCarNotificationListener.getNotifications().put(alertEntry.getKey(), alertEntry); in onNotificationRemoved_notificationPreviouslyAdded_removesNotification() local 269 assertThat(mCarNotificationListener.getNotifications().containsKey(alertEntry.getKey())) in onNotificationRemoved_notificationPreviouslyAdded_removesNotification()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/notification/ |
D | NotificationVisibilityLogger.java | 61 for (AlertEntry alertEntry : mNotificationDataManager.getVisibleNotifications()) { 63 alertEntry.getKey(),
|
D | NotificationPanelViewController.java | 309 mNotificationClickHandlerFactory.registerClickListener((launchResult, alertEntry) -> { in onNotificationViewInflated() argument
|