Home
last modified time | relevance | path

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

/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DMockListener.java81 for (StatusBarNotification sbn : mPosted) { in getPosted()
82 if (sbn.getTag().equals(tag)) { in getPosted()
83 return sbn; in getPosted()
158 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
159 if (!mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationPosted()
160 Log.d(TAG, "posted: " + sbn.getTag()); in onNotificationPosted()
161 mPosted.add(sbn); in onNotificationPosted()
162 mPostedNotifications.add(sbn.getNotification()); in onNotificationPosted()
165 notification.put(JSON_TAG, sbn.getTag()); in onNotificationPosted()
166 notification.put(JSON_ID, sbn.getId()); in onNotificationPosted()
[all …]
DNotificationListenerVerifierActivity.java340 StatusBarNotification sbn = MockListener.getInstance().getPosted(mTag1); in test() local
341 if (sbn == null) { in test()
349 sbn.getNotification()); in test()
556 StatusBarNotification sbn = MockListener.getInstance().getPosted(mTag1); in test() local
557 if (sbn != null) { in test()
558 MockListener.getInstance().getCurrentRanking().getRanking(sbn.getKey(), rank); in test()
1406 for (StatusBarNotification sbn : snoozed) { in getSnoozed()
1407 result.add(sbn.getTag()); in getSnoozed()
1482 for (StatusBarNotification sbn : snoozed) { in test()
1483 result.add(sbn.getTag()); in test()
/cts/tests/tests/notificationlegacy/notificationlegacy29/src/android/app/notification/legacy29/cts/
DTestNotificationListener.java41 for (StatusBarNotification sbn : mRemoved) { in checkRemovedKey()
42 if (sbn.getKey().equals(key)) return true; in checkRemovedKey()
85 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
86 android.util.Log.v(TAG, "notification posted: " + sbn); in onNotificationPosted()
87 if (!PKG.equals(sbn.getPackageName())) { in onNotificationPosted()
91 mPosted.add(sbn); in onNotificationPosted()
95 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationRemoved() argument
96 android.util.Log.v(TAG, "notification removed: " + sbn); in onNotificationRemoved()
97 if (!mTestPackages.contains(sbn.getPackageName())) { in onNotificationRemoved()
100 android.util.Log.v(TAG, "adding to removed: " + sbn); in onNotificationRemoved()
[all …]
DNotificationAssistantServiceTest.java120 StatusBarNotification sbn = getFirstNotificationFromPackage(TestNotificationListener.PKG); in testOnNotificationEnqueued() local
122 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testOnNotificationEnqueued()
134 sbn = getFirstNotificationFromPackage(TestNotificationListener.PKG); in testOnNotificationEnqueued()
135 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testOnNotificationEnqueued()
153 StatusBarNotification sbn = getFirstNotificationFromPackage(TestNotificationListener.PKG); in testAdjustNotification_userSentimentKey() local
155 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testAdjustNotification_userSentimentKey()
163 Adjustment adjustment = new Adjustment(sbn.getPackageName(), sbn.getKey(), signals, "", in testAdjustNotification_userSentimentKey()
164 sbn.getUser()); in testAdjustNotification_userSentimentKey()
169 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testAdjustNotification_userSentimentKey()
184 StatusBarNotification sbn = getFirstNotificationFromPackage(TestNotificationListener.PKG); in testAdjustNotification_importanceKey() local
[all …]
DTestNotificationAssistant.java87 public Adjustment onNotificationEnqueued(StatusBarNotification sbn) { in onNotificationEnqueued() argument
92 public Adjustment onNotificationEnqueued(StatusBarNotification sbn, NotificationChannel channel, in onNotificationEnqueued() argument
96 rankingMap.getRanking(sbn.getKey(), ranking); in onNotificationEnqueued()
99 return new Adjustment(sbn.getPackageName(), sbn.getKey(), signals, "", in onNotificationEnqueued()
100 sbn.getUser()); in onNotificationEnqueued()
DNotificationManager29Test.java113 for (StatusBarNotification sbn : sbns) { in findPostedNotification()
114 Log.d(TAG, "Found " + sbn.getKey()); in findPostedNotification()
115 if (sbn.getId() == id) { in findPostedNotification()
116 n = sbn; in findPostedNotification()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DCrossProfileNotificationListenerService.java34 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument
35 Log.i(TAG, "onNotificationPosted(" + sbn + ")"); in onNotificationPosted()
36 sendBroadcastForNotification(sbn, ACTION_NOTIFICATION_POSTED); in onNotificationPosted()
40 public void onNotificationRemoved(StatusBarNotification sbn) { in onNotificationRemoved() argument
41 Log.i(TAG, "onNotificationRemoved(" + sbn + ")"); in onNotificationRemoved()
42 sendBroadcastForNotification(sbn, ACTION_NOTIFICATION_REMOVED); in onNotificationRemoved()
57 private void sendBroadcastForNotification(StatusBarNotification sbn, String action) { in sendBroadcastForNotification() argument
58 if (NOTIFICATION_CHANNEL.equals(sbn.getNotification().getChannelId())) { in sendBroadcastForNotification()
62 + sbn.getNotification().getChannelId()); in sendBroadcastForNotification()
DNotificationListener.java59 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument
61 listener.accept(sbn); in onNotificationPosted()
/cts/tests/app/app/src/android/app/stubs/
DTestNotificationListener.java103 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
104 if (sbn == null || !mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationPosted()
106 mPosted.add(sbn); in onNotificationPosted()
110 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap, in onNotificationRemoved() argument
112 if (sbn == null || !mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationRemoved()
114 mRemoved.put(sbn.getKey(), reason); in onNotificationRemoved()
/cts/tests/tests/notificationlegacy/notificationlegacy27/src/android/app/notification/legacy/cts/
DSecondaryNotificationListener.java75 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
76 if (!mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationPosted()
77 mPosted.add(sbn); in onNotificationPosted()
81 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationRemoved() argument
82 if (!mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationRemoved()
83 mRemoved.add(sbn); in onNotificationRemoved()
DTestNotificationListener.java78 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
79 if (!mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationPosted()
81 mPosted.add(sbn); in onNotificationPosted()
85 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap, in onNotificationRemoved() argument
87 if (!mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationRemoved()
89 mRemoved.put(sbn.getKey(), reason); in onNotificationRemoved()
/cts/tests/tests/notificationlegacy/notificationlegacy20/src/android/app/notification/legacy20/cts/
DTestNotificationListener.java76 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument
77 if (!mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationPosted()
79 mPosted.add(sbn); in onNotificationPosted()
83 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationRemoved() argument
84 if (!mTestPackages.contains(sbn.getPackageName())) { return; } in onNotificationRemoved()
86 mRemoved.add(sbn); in onNotificationRemoved()
DLegacyNotificationManager20Test.java101 StatusBarNotification sbn = findPostedNotification(notificationId); in testNotificationListener_cancelNotifications() local
103 mListener.cancelNotification(sbn.getPackageName(), sbn.getTag(), sbn.getId()); in testNotificationListener_cancelNotifications()
114 mListener.cancelNotifications(new String[]{ sbn.getKey() }); in testNotificationListener_cancelNotifications()
205 for (StatusBarNotification sbn : sbns) { in checkNotificationExistence()
206 Log.d(TAG, "Found " + sbn.getKey()); in checkNotificationExistence()
207 if (sbn.getId() == id) { in checkNotificationExistence()
229 for (StatusBarNotification sbn : sbns) { in findPostedNotification()
230 Log.d(TAG, "Found " + sbn.getKey()); in findPostedNotification()
231 if (sbn.getId() == id) { in findPostedNotification()
232 n = sbn; in findPostedNotification()
/cts/tests/app/src/android/app/cts/
DStatusBarNotificationTest.java99 StatusBarNotification sbn = in testIsClearable_notClearableOngoingEvent() local
102 assertFalse(sbn.isClearable()); in testIsClearable_notClearableOngoingEvent()
120 StatusBarNotification sbn = in testIsGroup_notifGroup() local
123 assertTrue(sbn.isGroup()); in testIsGroup_notifGroup()
132 StatusBarNotification sbn = in testIsGroup_sortKey() local
135 assertTrue(sbn.isGroup()); in testIsGroup_sortKey()
148 StatusBarNotification sbn = in testIsOngoing_ongoingEvent() local
151 assertTrue(sbn.isOngoing()); in testIsOngoing_ongoingEvent()
DNotificationManagerTest.java328 StatusBarNotification sbn = findNotificationNoWait(id, all); in assertNotificationCancelled() local
329 if (sbn == null) return; in assertNotificationCancelled()
449 for (StatusBarNotification sbn : sbns) { in assertOnlySomeNotificationsAutogrouped()
450 if (isGroupSummary(sbn.getNotification()) in assertOnlySomeNotificationsAutogrouped()
451 || autoGroupedIds.contains(sbn.getId())) { in assertOnlySomeNotificationsAutogrouped()
452 assertTrue(sbn.getKey() + " is unexpectedly not autogrouped", in assertOnlySomeNotificationsAutogrouped()
453 sbn.getOverrideGroupKey() != null); in assertOnlySomeNotificationsAutogrouped()
455 expectedGroupKey = sbn.getGroupKey(); in assertOnlySomeNotificationsAutogrouped()
457 assertEquals(expectedGroupKey, sbn.getGroupKey()); in assertOnlySomeNotificationsAutogrouped()
459 assertTrue(sbn.isGroup()); in assertOnlySomeNotificationsAutogrouped()
[all …]
DServiceTest.java510 for (StatusBarNotification sbn : sbns) { in assertNotification()
511 if (sbn.getId() == id && sbn.getPackageName().equals(packageName)) { in assertNotification()
513 sbn.getNotification().extras.getString(Notification.EXTRA_TITLE); in assertNotification()
543 for (StatusBarNotification sbn : sbns) { in assertNoNotification()
544 if (sbn.getId() == id && sbn.getPackageName().equals(packageName)) { in assertNoNotification()
545 found = sbn; in assertNoNotification()
/cts/tests/tests/systemui/src/android/systemui/cts/
DNotificationListener.kt26 override fun onNotificationPosted(sbn: StatusBarNotification) { in onNotificationPosted()
27 if (DEBUG) Log.d(TAG, "onNotificationPosted: $sbn") in onNotificationPosted()
30 override fun onNotificationRemoved(sbn: StatusBarNotification) { in onNotificationRemoved()
31 if (DEBUG) Log.d(TAG, "onNotificationRemoved: $sbn") in onNotificationRemoved()
/cts/tests/tests/notificationlegacy/notificationlegacy28/src/android/app/notification/legacy28/cts/
DNotificationManager28Test.java85 for (StatusBarNotification sbn : sbns) { in findPostedNotification()
86 Log.d(TAG, "Found " + sbn.getKey()); in findPostedNotification()
87 if (sbn.getId() == id) { in findPostedNotification()
88 n = sbn; in findPostedNotification()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DNotificationHelper.java64 for (StatusBarNotification sbn : getActiveNotifications(all)) { in findNotificationNoWait()
65 if (sbn.getId() == id) { in findNotificationNoWait()
66 return sbn; in findNotificationNoWait()
/cts/tests/tests/os/CompanionTestApp/src/android/os/cts/companiontestapp/
DNotificationListener.kt30 override fun onNotificationPosted(sbn: StatusBarNotification) { in onNotificationPosted()
31 super.onNotificationPosted(sbn) in onNotificationPosted()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DNotificationListener.java59 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument
61 listener.accept(sbn); in onNotificationPosted()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DNotificationListener.java59 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument
61 listener.accept(sbn); in onNotificationPosted()