Home
last modified time | relevance | path

Searched refs:sbn (Results 1 – 21 of 21) sorted by relevance

/packages/modules/ExtServices/tests/src/android/ext/services/notification/
DAssistantTest.java144 StatusBarNotification sbn = new StatusBarNotification(pkg, pkg, 0, tag, uid, uid, n, in generateSbn() local
147 return sbn; in generateSbn()
150 private Ranking generateRanking(StatusBarNotification sbn, NotificationChannel channel) { in generateRanking() argument
154 when(mockRanking.getKey()).thenReturn(sbn.getKey()); in generateRanking()
167 StatusBarNotification sbn = generateSbn(pkg, uid, channel, tag, null); in dismissBadNotification() local
168 mAssistant.setFakeRanking(generateRanking(sbn, channel)); in dismissBadNotification()
169 mAssistant.onNotificationPosted(sbn, mock(RankingMap.class)); in dismissBadNotification()
175 sbn, mock(RankingMap.class), stats, NotificationListenerService.REASON_CANCEL); in dismissBadNotification()
180 StatusBarNotification sbn = generateSbn(PKG1, UID1, P1C1, null, null); in testNoAdjustmentForInitialPost() local
182 mAssistant.setFakeRanking(generateRanking(sbn, P1C1)); in testNoAdjustmentForInitialPost()
[all …]
DAgingHelperTest.java104 StatusBarNotification sbn = generateSbn(channel.getId()); in testNoSnoozingOnPost() local
106 mContext, mPackageManager, sbn, channel, mSmsHelper); in testNoSnoozingOnPost()
116 StatusBarNotification sbn = generateSbn(channel.getId()); in testPostResetsSnooze() local
118 mContext, mPackageManager, sbn, channel, mSmsHelper); in testPostResetsSnooze()
128 StatusBarNotification sbn = generateSbn(channel.getId()); in testSnoozingOnSeen() local
130 mContext, mPackageManager, sbn, channel, mSmsHelper); in testSnoozingOnSeen()
142 StatusBarNotification sbn = generateSbn(channel.getId()); in testNoSnoozingOnSeenUserLocked() local
144 mContext, mPackageManager, sbn, channel, mSmsHelper); in testNoSnoozingOnSeenUserLocked()
DNotificationEntryTest.java114 StatusBarNotification sbn = generateSbn(channel.getId()); in testHasPerson() local
117 sbn.getNotification().extras.putParcelableArrayList(Notification.EXTRA_PEOPLE_LIST, people); in testHasPerson()
120 mContext, mPackageManager, sbn, channel, mSmsHelper); in testHasPerson()
127 StatusBarNotification sbn = generateSbn(channel.getId()); in testNotPerson() local
129 mContext, mPackageManager, sbn, channel, mSmsHelper); in testNotPerson()
136 StatusBarNotification sbn = generateSbn(channel.getId(), DEFAULT_SMS_PACKAGE_NAME); in testHasPerson_matchesDefaultSmsApp() local
138 mContext, mPackageManager, sbn, channel, mSmsHelper); in testHasPerson_matchesDefaultSmsApp()
145 StatusBarNotification sbn = generateSbn(channel.getId(), "abc"); in testHasPerson_doesntMatchDefaultSmsApp() local
147 mContext, mPackageManager, sbn, channel, mSmsHelper); in testHasPerson_doesntMatchDefaultSmsApp()
/packages/apps/Launcher3/src/com/android/launcher3/notification/
DNotificationListener.java223 public void onNotificationPosted(final StatusBarNotification sbn) { in onNotificationPosted() argument
224 super.onNotificationPosted(sbn); in onNotificationPosted()
225 if (sbn == null) { in onNotificationPosted()
229 mWorkerHandler.obtainMessage(MSG_NOTIFICATION_POSTED, new NotificationPostedMsg(sbn)) in onNotificationPosted()
232 sStatusBarNotificationsChangedListener.onNotificationPosted(sbn); in onNotificationPosted()
244 NotificationPostedMsg(StatusBarNotification sbn) { in NotificationPostedMsg() argument
245 packageUserKey = PackageUserKey.fromNotification(sbn); in NotificationPostedMsg()
246 notificationKey = NotificationKeyData.fromNotification(sbn); in NotificationPostedMsg()
247 shouldBeFilteredOut = shouldBeFilteredOut(sbn); in NotificationPostedMsg()
252 public void onNotificationRemoved(final StatusBarNotification sbn) { in onNotificationRemoved() argument
[all …]
DNotificationKeyData.java44 public static NotificationKeyData fromNotification(StatusBarNotification sbn) { in fromNotification() argument
45 Notification notif = sbn.getNotification(); in fromNotification()
46 return new NotificationKeyData(sbn.getKey(), notif.getShortcutId(), notif.number); in fromNotification()
/packages/apps/Car/Notification/src/com/android/car/notification/
DCarNotificationListener.java110 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
111 Log.d(TAG, "onNotificationPosted: " + sbn); in onNotificationPosted()
114 if (sbn.getUser().getIdentifier() != ActivityManager.getCurrentUser() in onNotificationPosted()
115 && sbn.getUser().getIdentifier() != UserHandle.USER_ALL) { in onNotificationPosted()
119 notifyNotificationPosted(sbn); in onNotificationPosted()
123 public void onNotificationRemoved(StatusBarNotification sbn) { in onNotificationRemoved() argument
124 Log.d(TAG, "onNotificationRemoved: " + sbn); in onNotificationRemoved()
125 mActiveNotifications.remove(sbn.getKey()); in onNotificationRemoved()
126 mHeadsUpManager.maybeRemoveHeadsUp(sbn); in onNotificationRemoved()
127 notifyNotificationRemoved(sbn); in onNotificationRemoved()
[all …]
DNotificationDataManager.java93 for (StatusBarNotification sbn : group.getChildNotifications()) { in updateUnseenNotification()
95 mUnseenNotificationMap.putIfAbsent(sbn.getKey(), true); in updateUnseenNotification()
98 currentNotificationKeys.remove(sbn.getKey()); in updateUnseenNotification()
128 public void toggleMute(StatusBarNotification sbn) { in toggleMute() argument
129 if (CarAssistUtils.isCarCompatibleMessagingNotification(sbn)) { in toggleMute()
130 String sbnKey = sbn.getKey(); in toggleMute()
136 + sbn.getKey()); in toggleMute()
153 void setNotificationAsSeen(StatusBarNotification sbn) { in setNotificationAsSeen() argument
154 if (mUnseenNotificationMap.containsKey(sbn.getKey())) { in setNotificationAsSeen()
155 mUnseenNotificationMap.put(sbn.getKey(), false); in setNotificationAsSeen()
DCarNotificationItemTouchListener.java127 for (StatusBarNotification sbn in CarNotificationItemTouchListener()
130 sbn.getPackageName(), in CarNotificationItemTouchListener()
131 sbn.getTag(), in CarNotificationItemTouchListener()
132 sbn.getId(), in CarNotificationItemTouchListener()
133 sbn.getUser().getIdentifier(), in CarNotificationItemTouchListener()
134 sbn.getKey(), in CarNotificationItemTouchListener()
DPreprocessingManager.java117 StatusBarNotification sbn, in updateNotifications() argument
123 mOldNotifications.remove(sbn.getKey()); in updateNotifications()
129 StatusBarNotification notification = optimizeForDriving(sbn); in updateNotifications()
151 boolean shouldFilter(StatusBarNotification sbn, RankingMap rankingMap) { in shouldFilter() argument
152 return isLessImportantForegroundNotification(sbn, rankingMap) in shouldFilter()
153 || isMediaOrNavigationNotification(sbn); in shouldFilter()
DNotificationViewController.java117 boolean showLessImportantNotifications, int what, StatusBarNotification sbn) { in updateNotifications() argument
119 if (mPreprocessingManager.shouldFilter(sbn, mCarNotificationListener.getCurrentRanking())) { in updateNotifications()
127 sbn, in updateNotifications()
DNotificationClickHandlerFactory.java269 private boolean shouldAutoCancel(StatusBarNotification sbn) {
270 int flags = sbn.getNotification().flags;
DCarHeadsUpNotificationManager.java566 private boolean hasFullScreenIntent(StatusBarNotification sbn) { in hasFullScreenIntent() argument
567 return sbn.getNotification().fullScreenIntent != null; in hasFullScreenIntent()
/packages/apps/Car/libs/car-assist-client-lib/src/com/android/car/assist/client/
DCarAssistUtils.java163 public static boolean isCarCompatibleMessagingNotification(StatusBarNotification sbn) { in isCarCompatibleMessagingNotification() argument
164 return hasMessagingStyle(sbn) in isCarCompatibleMessagingNotification()
165 && hasRequiredAssistantCallbacks(sbn) in isCarCompatibleMessagingNotification()
166 && replyCallbackHasRemoteInput(sbn) in isCarCompatibleMessagingNotification()
167 && assistantCallbacksShowNoUi(sbn); in isCarCompatibleMessagingNotification()
182 private static boolean hasMessagingStyle(StatusBarNotification sbn) { in hasMessagingStyle() argument
184 .extractMessagingStyleFromNotification(sbn.getNotification()) != null; in hasMessagingStyle()
192 private static boolean hasRequiredAssistantCallbacks(StatusBarNotification sbn) { in hasRequiredAssistantCallbacks() argument
193 List<Integer> semanticActionList = getAllActions(sbn.getNotification()) in hasRequiredAssistantCallbacks()
233 private static boolean replyCallbackHasRemoteInput(StatusBarNotification sbn) { in replyCallbackHasRemoteInput() argument
[all …]
DFallbackAssistant.java104 public void handleReadAction(StatusBarNotification sbn, Listener listener) { in handleReadAction() argument
109 Parcelable[] messagesBundle = sbn.getNotification().extras in handleReadAction()
141 mRequestIdToActionRequestInfo.put(requestId, new ActionRequestInfo(sbn, listener)); in handleReadAction()
186 private void sendMarkAsReadIntent(StatusBarNotification sbn) { in sendMarkAsReadIntent() argument
188 sbn.getNotification()); in sendMarkAsReadIntent()
199 + sbn.getKey()); in sendMarkAsReadIntent()
/packages/modules/ExtServices/src/android/ext/services/notification/
DAssistant.java221 public Adjustment onNotificationEnqueued(StatusBarNotification sbn) { in onNotificationEnqueued() argument
227 public Adjustment onNotificationEnqueued(StatusBarNotification sbn, in onNotificationEnqueued() argument
229 if (DEBUG) Log.i(TAG, "ENQUEUED " + sbn.getKey() + " on " + channel.getId()); in onNotificationEnqueued()
230 if (!isForCurrentUser(sbn)) { in onNotificationEnqueued()
235 new NotificationEntry(getContext(), mPackageManager, sbn, channel, mSmsHelper); in onNotificationEnqueued()
240 sbn.getKey(), suggestions.actions.size(), suggestions.replies.size())); in onNotificationEnqueued()
284 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) {
285 if (DEBUG) Log.i(TAG, "POSTED " + sbn.getKey());
287 if (!isForCurrentUser(sbn)) {
290 Ranking ranking = getRanking(sbn.getKey(), rankingMap);
[all …]
DNotificationEntry.java73 StatusBarNotification sbn, NotificationChannel channel, SmsHelper smsHelper) { in NotificationEntry() argument
75 mSbn = cloneStatusBarNotificationLight(sbn); in NotificationEntry()
130 public StatusBarNotification cloneStatusBarNotificationLight(StatusBarNotification sbn) { in cloneStatusBarNotificationLight() argument
132 sbn.getPackageName(), in cloneStatusBarNotificationLight()
133 sbn.getOpPkg(), in cloneStatusBarNotificationLight()
134 sbn.getId(), in cloneStatusBarNotificationLight()
135 sbn.getTag(), in cloneStatusBarNotificationLight()
136 sbn.getUid(), in cloneStatusBarNotificationLight()
139 cloneNotificationLight(sbn.getNotification()), in cloneStatusBarNotificationLight()
140 sbn.getUser(), in cloneStatusBarNotificationLight()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DNotificationStation.java105 public void onNotificationPosted(StatusBarNotification sbn, RankingMap ranking) {
106 logd("onNotificationPosted: %s, with update for %d", sbn.getNotification(),
281 for (StatusBarNotification sbn : resultset) { in loadNotifications()
282 if (sbn.getUserId() != UserHandle.USER_ALL & sbn.getUserId() != currentUserId) { in loadNotifications()
286 final Notification n = sbn.getNotification(); in loadNotifications()
288 info.pkg = sbn.getPackageName(); in loadNotifications()
289 info.user = sbn.getUserId(); in loadNotifications()
297 info.timestamp = sbn.getPostTime(); in loadNotifications()
300 info.key = sbn.getKey(); in loadNotifications()
304 info.extra = generateExtraText(sbn, info); in loadNotifications()
[all …]
/packages/apps/Settings/src/com/android/settings/notification/
DNotificationStation.java105 public void onNotificationPosted(StatusBarNotification sbn, RankingMap ranking) {
106 logd("onNotificationPosted: %s, with update for %d", sbn.getNotification(),
281 for (StatusBarNotification sbn : resultset) { in loadNotifications()
282 if (sbn.getUserId() != UserHandle.USER_ALL & sbn.getUserId() != currentUserId) { in loadNotifications()
286 final Notification n = sbn.getNotification(); in loadNotifications()
288 info.pkg = sbn.getPackageName(); in loadNotifications()
289 info.user = sbn.getUserId(); in loadNotifications()
297 info.timestamp = sbn.getPostTime(); in loadNotifications()
300 info.key = sbn.getKey(); in loadNotifications()
304 info.extra = generateExtraText(sbn, info); in loadNotifications()
[all …]
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/services/
DTestNotificationService.java114 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument
115 String pkgName = sbn.getPackageName(); in onNotificationPosted()
119 mCancelled = doCancel(sbn.getNotification()); in onNotificationPosted()
128 public void onNotificationRemoved(StatusBarNotification sbn) { in onNotificationRemoved() argument
129 String pkgName = sbn.getPackageName(); in onNotificationRemoved()
141 boolean isStartProgress = isStartProgress(sbn.getNotification()); in onNotificationRemoved()
/packages/apps/Car/libs/car-assist-lib/src/com/android/car/assist/payloadhandlers/
DNotificationPayloadHandler.java67 StatusBarNotification sbn = args.getParcelable(CarVoiceInteractionSession.KEY_NOTIFICATION); in getNotification() local
69 return sbn == null ? null : sbn.getNotification(); in getNotification()
/packages/apps/Car/Notification/tests/robotests/src/com/android/car/notification/testutils/
DShadowCarAssistUtils.java35 public static boolean isCarCompatibleMessagingNotification(StatusBarNotification sbn) { in isCarCompatibleMessagingNotification() argument
36 return mMessageNotificationSbnKeys.contains(sbn.getKey()); in isCarCompatibleMessagingNotification()