/cts/tests/app/shared/src/android/app/stubs/shared/ |
D | TestNotificationListener.java | 107 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument 108 if (sbn == null || !mTestPackages.contains(sbn.getPackageName())) { in onNotificationPosted() 109 Log.d(TAG, "onNotificationPosted: skipping handling sbn=" + sbn + " testPackages=" in onNotificationPosted() 113 Log.d(TAG, "onNotificationPosted: sbn=" + sbn + " testPackages=" + listToString( in onNotificationPosted() 116 mPosted.add(sbn); in onNotificationPosted() 121 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument 122 if (sbn == null || !mTestPackages.contains(sbn.getPackageName())) { in onNotificationPosted() 123 Log.d(TAG, "onNotificationPosted: skipping handling sbn=" + sbn + " testPackages=" in onNotificationPosted() 127 Log.d(TAG, "onNotificationPosted: sbn=" + sbn + " testPackages=" + listToString( in onNotificationPosted() 132 mPosted.add(sbn); in onNotificationPosted() [all …]
|
D | TestNotificationAssistant.java | 122 public Adjustment onNotificationEnqueued(StatusBarNotification sbn) { in onNotificationEnqueued() argument 127 public Adjustment onNotificationEnqueued(StatusBarNotification sbn, NotificationChannel channel, in onNotificationEnqueued() argument 131 rankingMap.getRanking(sbn.getKey(), ranking); in onNotificationEnqueued() 143 return new Adjustment(sbn.getPackageName(), sbn.getKey(), signals, "", in onNotificationEnqueued() 144 sbn.getUser()); in onNotificationEnqueued() 193 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument 198 public void onNotificationRemoved(StatusBarNotification sbn) { in onNotificationRemoved() argument 199 if (sbn == null) { in onNotificationRemoved() 202 mRemoved.put(sbn.getKey(), -1); in onNotificationRemoved() 206 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap, in onNotificationRemoved() argument [all …]
|
D | NotificationHelper.java | 127 for (StatusBarNotification sbn : getNotifications(searchType)) { in isNotificationGone() 128 Log.d(TAG, "Found " + sbn.getKey()); in isNotificationGone() 129 if (sbn.getId() == id) { in isNotificationGone() 163 for (StatusBarNotification sbn : getNotifications(searchType)) { in findNotificationNoWait() 164 if (sbn.getId() == id && Objects.equal(sbn.getTag(), tag)) { in findNotificationNoWait() 165 return sbn; in findNotificationNoWait()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/ |
D | MockListener.java | 81 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 …]
|
/cts/tests/JobScheduler/src/android/jobscheduler/cts/ |
D | TestNotificationListener.java | 96 StatusBarNotification sbn = mPosted.poll(SLEEP_TIME_MS, TimeUnit.MILLISECONDS); in getFirstNotificationFromPackage() local 97 if (sbn != null && sbn.getPackageName().equals(packageName)) { in getFirstNotificationFromPackage() 98 return sbn; in getFirstNotificationFromPackage() 121 public void onNotificationPosted(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationPosted() argument 122 Log.v(TAG, "notification posted: " + sbn); in onNotificationPosted() 123 if (!mTestPackages.contains(sbn.getPackageName())) { in onNotificationPosted() 124 Log.d(TAG, "Ignoring notification from " + sbn.getPackageName() in onNotificationPosted() 128 Log.v(TAG, "adding to added: " + sbn); in onNotificationPosted() 129 mPosted.add(sbn); in onNotificationPosted() 133 public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap) { in onNotificationRemoved() argument [all …]
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0704/test-app/src/android/security/cts/CVE_2021_0704_test/ |
D | ListenerService.java | 33 for (StatusBarNotification sbn : getActiveNotifications()) { in onListenerConnected() 34 if (broadcastIfVulnerableNotificationFound(sbn)) { in onListenerConnected() 45 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument 47 broadcastIfVulnerableNotificationFound(sbn); in onNotificationPosted() 54 private boolean broadcastIfVulnerableNotificationFound(StatusBarNotification sbn) { in broadcastIfVulnerableNotificationFound() argument 56 Bundle notificationExtras = sbn.getNotification().extras; in broadcastIfVulnerableNotificationFound() 65 if (pattern.matcher(sbn.getTag()).find() in broadcastIfVulnerableNotificationFound() 69 notificationManager.cancel(sbn.getTag(), sbn.getId()); in broadcastIfVulnerableNotificationFound() 71 if (sbn.getPackageName().equalsIgnoreCase(getPackageName()) in broadcastIfVulnerableNotificationFound() 75 } else if (sbn.getPackageName().equalsIgnoreCase(getString(R.string.pkgAndroid)) in broadcastIfVulnerableNotificationFound()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | CrossProfileNotificationListenerService.java | 34 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()
|
D | NotificationListener.java | 62 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument 64 listener.accept(sbn); in onNotificationPosted()
|
/cts/tests/tests/notificationlegacy/notificationlegacy29/src/android/app/notification/legacy29/cts/ |
D | NotificationAssistantServiceTest.java | 141 StatusBarNotification sbn = mHelper.findPostedNotification( in testOnNotificationEnqueued() local 144 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testOnNotificationEnqueued() 154 sbn = mHelper.findPostedNotification(null, 1, NotificationHelper.SEARCH_TYPE.POSTED); in testOnNotificationEnqueued() 155 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testOnNotificationEnqueued() 169 StatusBarNotification sbn = mHelper.findPostedNotification( in testAdjustNotification_userSentimentKey() local 171 assertNotNull(sbn); in testAdjustNotification_userSentimentKey() 173 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testAdjustNotification_userSentimentKey() 181 Adjustment adjustment = new Adjustment(sbn.getPackageName(), sbn.getKey(), signals, "", in testAdjustNotification_userSentimentKey() 182 sbn.getUser()); in testAdjustNotification_userSentimentKey() 187 mNotificationListenerService.mRankingMap.getRanking(sbn.getKey(), out); in testAdjustNotification_userSentimentKey() [all …]
|
/cts/tests/tests/notification/src/android/app/notification/current/cts/ |
D | SensitiveNotificationRedactionTest.kt | 160 val sbn = mNotificationHelper.findPostedNotification(tag, NOTIFICATION_ID, searchType) in waitForNotification() constant 162 .that(sbn).isNotNull() in waitForNotification() 163 return sbn!! in waitForNotification() 173 val sbn = waitForNotification() in testTextFieldsRedacted() constant 175 val title = sbn.notification.extras.getCharSequence(EXTRA_TITLE)!! in testTextFieldsRedacted() 182 assertNotificationTextRedacted(sbn) in testTextFieldsRedacted() 184 val subtext = sbn.notification.extras.getCharSequence(EXTRA_SUB_TEXT) in testTextFieldsRedacted() 187 val textLines = sbn.notification.extras.getCharSequenceArray(EXTRA_TEXT_LINES) in testTextFieldsRedacted() 210 val sbn = waitForNotification() in testActionsRedacted() constant 211 val action = sbn.notification.actions.firstOrNull() in testActionsRedacted() [all …]
|
D | StatusBarNotificationTest.java | 126 StatusBarNotification sbn = in testIsClearable_notClearableOngoingEvent() local 129 assertFalse(sbn.isClearable()); in testIsClearable_notClearableOngoingEvent() 150 StatusBarNotification sbn = in testIsGroup_notifGroup() local 153 assertTrue(sbn.isGroup()); in testIsGroup_notifGroup() 163 StatusBarNotification sbn = in testIsGroup_sortKey() local 166 assertTrue(sbn.isGroup()); in testIsGroup_sortKey() 181 StatusBarNotification sbn = in testIsOngoing_ongoingEvent() local 184 assertTrue(sbn.isOngoing()); in testIsOngoing_ongoingEvent()
|
D | NotificationManagerBubbleTest.java | 190 StatusBarNotification sbn = in verifyNotificationBubbleState() local 192 assertNotNull("Cannot find notification id=" + id, sbn); in verifyNotificationBubbleState() 194 shouldBeBubble, ((sbn.getNotification().flags & FLAG_BUBBLE) != 0)); in verifyNotificationBubbleState() 950 StatusBarNotification sbn = mNotificationHelper.findPostedNotification(null, notifId, in testNotificationManagerBubble_setSuppressBubble() local 952 assertTrue(sbn.getNotification().getBubbleMetadata().isBubbleSuppressable()); in testNotificationManagerBubble_setSuppressBubble() 953 assertTrue(sbn.getNotification().getBubbleMetadata().isBubbleSuppressed()); in testNotificationManagerBubble_setSuppressBubble() 995 StatusBarNotification sbn = mNotificationHelper.findPostedNotification(null, in testNotificationManagerBubble_setSuppressBubble_notSuppressable() local 997 assertFalse(sbn.getNotification().getBubbleMetadata().isBubbleSuppressable()); in testNotificationManagerBubble_setSuppressBubble_notSuppressable() 998 assertFalse(sbn.getNotification().getBubbleMetadata().isBubbleSuppressed()); in testNotificationManagerBubble_setSuppressBubble_notSuppressable() 1039 StatusBarNotification sbn = mNotificationHelper.findPostedNotification(null, in testNotificationManagerBubble_setSuppressBubble_activityNoLocusId() local [all …]
|
D | NotificationManagerTest.java | 324 for (StatusBarNotification sbn : sbns) { in assertOnlySomeNotificationsAutogrouped() 325 if (isGroupSummary(sbn.getNotification()) in assertOnlySomeNotificationsAutogrouped() 326 || autoGroupedIds.contains(sbn.getId())) { in assertOnlySomeNotificationsAutogrouped() 327 assertTrue(sbn.getKey() + " is unexpectedly not autogrouped", in assertOnlySomeNotificationsAutogrouped() 328 sbn.getOverrideGroupKey() != null); in assertOnlySomeNotificationsAutogrouped() 330 expectedGroupKey = sbn.getGroupKey(); in assertOnlySomeNotificationsAutogrouped() 332 assertEquals(expectedGroupKey, sbn.getGroupKey()); in assertOnlySomeNotificationsAutogrouped() 334 assertTrue(sbn.isGroup()); in assertOnlySomeNotificationsAutogrouped() 335 assertTrue(sbn.getKey() + " is unexpectedly autogrouped,", in assertOnlySomeNotificationsAutogrouped() 336 sbn.getOverrideGroupKey() == null); in assertOnlySomeNotificationsAutogrouped() [all …]
|
/cts/tests/tests/notificationlegacy/notificationlegacy27/src/android/app/notification/legacy/cts/ |
D | SecondaryNotificationListener.java | 75 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()
|
D | LegacyNotificationManagerTest.java | 204 StatusBarNotification sbn = mHelper.findPostedNotification( in testSuspendPackage() local 206 assertNotNull(sbn); in testSuspendPackage() 211 assertTrue(mHelper.isNotificationGone(sbn.getKey())); in testSuspendPackage() 320 StatusBarNotification sbn = mHelper.findPostedNotification( in testChannelDeletion_cancelReason() local 322 assertNotNull(sbn); in testChannelDeletion_cancelReason() 326 assertTrue(mHelper.isNotificationGone(sbn.getKey())); in testChannelDeletion_cancelReason() 328 mListener.mRemovedReasons.get(sbn.getKey())); in testChannelDeletion_cancelReason()
|
/cts/tests/tests/notificationlegacy/notificationlegacy34/src/android/app/notification/legacy34/cts/ |
D | NotificationManagerApi34Test.kt | 76 val sbn: StatusBarNotification = helper.findPostedNotification( in testMediaStyle_noClearFlagNotSet() constant 81 assertNotNull(sbn) in testMediaStyle_noClearFlagNotSet() 82 assertNotEquals(FLAG_NO_CLEAR, sbn.getNotification().flags and FLAG_NO_CLEAR) in testMediaStyle_noClearFlagNotSet() 93 val sbn: StatusBarNotification = helper.findPostedNotification( in testCustomMediaStyle_noClearFlagNotSet() constant 98 assertNotNull(sbn) in testCustomMediaStyle_noClearFlagNotSet() 99 assertNotEquals(FLAG_NO_CLEAR, sbn.getNotification().flags and FLAG_NO_CLEAR) in testCustomMediaStyle_noClearFlagNotSet()
|
/cts/tests/tests/systemui/src/android/systemui/cts/ |
D | NotificationListener.kt | 26 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/companion/CompanionDeviceTestApp/src/android.os.cts.companiondevicetestapp/ |
D | NotificationListener.kt | 30 override fun onNotificationPosted(sbn: StatusBarNotification) { in onNotificationPosted() 31 super.onNotificationPosted(sbn) in onNotificationPosted()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | NotificationListener.java | 68 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument 69 Log.d(TAG, "Notification posted: " + sbn); in onNotificationPosted() 71 listener.accept(sbn); in onNotificationPosted()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/notifications/ |
D | NeneNotificationListenerService.kt | 42 override fun onNotificationPosted(sbn: StatusBarNotification) { in onNotificationPosted() 43 Notifications.onNotificationPosted(Notification(sbn)) in onNotificationPosted()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2023_21143.java | 87 for (StatusBarNotification sbn : in testPocCVE_2023_21143() 89 if (sbn.getPackageName().equals(packageName)) { in testPocCVE_2023_21143() 100 for (StatusBarNotification sbn : notificationManager.getActiveNotifications()) { in testPocCVE_2023_21143() 101 isDeviceVulnerable = sbn.getPackageName().equals(context.getPackageName()); in testPocCVE_2023_21143()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | NotificationListener.java | 59 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument 61 listener.accept(sbn); in onNotificationPosted()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21144/src/android/security/cts/CVE_2023_21144/ |
D | PocListenerService.java | 26 public void onNotificationPosted(StatusBarNotification sbn) { in onNotificationPosted() argument
|
/cts/tests/tests/telecom-apps/Utils/src/android/telecom/cts/apps/ |
D | NotificationUtils.java | 118 for (StatusBarNotification sbn : sbinArray) { in isTargetNotificationPosted() 119 if (sbn.getId() == targetNotificationId) { in isTargetNotificationPosted()
|
/cts/tests/sensitivecontentprotection/src/android/sensitivecontentprotection/cts/ |
D | SensitiveNotificationAppHidingTest.kt | 112 val sbn = in <lambda>() constant 119 .that(sbn) in <lambda>() 121 return sbn!! in <lambda>()
|