Home
last modified time | relevance | path

Searched refs:mNotificationManager (Results 1 – 25 of 29) sorted by relevance

12

/cts/tests/tests/notification/src/android/app/notification/current/cts/
DNotificationManagerZenTest.java203 mOriginalPolicy = mNotificationManager.getNotificationPolicy(); in setUp()
205 mNotificationManager.setNotificationPolicy(new NotificationManager.Policy( in setUp()
213 mNotificationManager.setInterruptionFilter(INTERRUPTION_FILTER_ALL); in setUp()
217 mDefaultPolicy = mNotificationManager.getDefaultZenPolicy(); in setUp()
236 mNotificationManager.setInterruptionFilter(INTERRUPTION_FILTER_ALL); in tearDown()
238 mNotificationManager.setNotificationPolicy(mOriginalPolicy); in tearDown()
316 mNotificationManager.notify(BOB, 2, bob.build()); in sendNotifications()
328 mNotificationManager.notify(CHARLIE, 3, charlie.build()); in sendNotifications()
339 mNotificationManager.notify(ALICE, 1, alice.build()); in sendNotifications()
359 mNotificationManager.notify(ALICE, 4, alice.build()); in sendEventAlarmReminderNotifications()
[all …]
DNotificationManagerTest.java323 StatusBarNotification[] sbns = mNotificationManager.getActiveNotifications(); in assertOnlySomeNotificationsAutogrouped()
348 StatusBarNotification[] sbns = mNotificationManager.getActiveNotifications(); in assertAllPostedNotificationsAutogrouped()
394 final StatusBarNotification[] sbns = mNotificationManager.getActiveNotifications(); in assertNotificationCount()
498 assertTrue(mNotificationManager.canUseFullScreenIntent()); in verifyCanUseFullScreenIntent()
500 assertFalse(mNotificationManager.canUseFullScreenIntent()); in verifyCanUseFullScreenIntent()
535 mNotificationManager.createNotificationChannelGroup(ncg); in testCreateChannelGroup()
539 mNotificationManager.createNotificationChannel(channel); in testCreateChannelGroup()
540 mNotificationManager.createNotificationChannel(ungrouped); in testCreateChannelGroup()
543 mNotificationManager.getNotificationChannelGroups(); in testCreateChannelGroup()
549 mNotificationManager.deleteNotificationChannelGroup(ncg.getId()); in testCreateChannelGroup()
[all …]
DBaseNotificationManagerTest.java105 protected NotificationManager mNotificationManager; field in BaseNotificationManagerTest
116 mNotificationManager = mContext.getSystemService(NotificationManager.class); in baseSetUp()
119 mNotificationManager.cancelAll(); in baseSetUp()
122 0, mNotificationManager.getActiveNotifications().length); in baseSetUp()
124 mNotificationManager.createNotificationChannel(NOTIFICATION_CHANNEL); in baseSetUp()
137 runAsSystemUi(() -> mNotificationManager.setInterruptionFilter(INTERRUPTION_FILTER_ALL)); in baseSetUp()
148 mNotificationManager.cancelAll(); in baseTearDown()
152 List<NotificationChannel> channels = mNotificationManager.getNotificationChannels(); in baseTearDown()
158 mNotificationManager.deleteNotificationChannel(nc.getId()); in baseTearDown()
169 List<NotificationChannelGroup> groups = mNotificationManager.getNotificationChannelGroups(); in baseTearDown()
[all …]
DPeopleManagerTest.java84 private NotificationManager mNotificationManager; field in PeopleManagerTest
97 mNotificationManager = mContext.getSystemService(NotificationManager.class); in setUp()
103 mNotificationManager.createNotificationChannel(new NotificationChannel( in setUp()
108 mNotificationManager.createNotificationChannel(personChannel); in setUp()
110 mNotificationManager.notify(177, getConversationNotification().build()); in setUp()
116 mNotificationManager.cancelAll(); in tearDown()
118 List<NotificationChannel> channels = mNotificationManager.getNotificationChannels(); in tearDown()
124 mNotificationManager.deleteNotificationChannel(nc.getId()); in tearDown()
DNotificationManagerBubbleTest.java154 mNotificationManager.notify(id, notif); in sendAndVerifyBubble()
384 assertFalse(mNotificationManager.areBubblesAllowed()); in testAreBubblesAllowed_appNone()
394 assertFalse(mNotificationManager.areBubblesAllowed()); in testAreBubblesAllowed_appSelected()
404 assertTrue(mNotificationManager.areBubblesAllowed()); in testAreBubblesAllowed_appAll()
414 assertEquals(BUBBLE_PREFERENCE_NONE, mNotificationManager.getBubblePreference()); in testGetBubblePreference_appNone()
424 assertEquals(BUBBLE_PREFERENCE_SELECTED, mNotificationManager.getBubblePreference()); in testGetBubblePreference_appSelected()
434 assertEquals(BUBBLE_PREFERENCE_ALL, mNotificationManager.getBubblePreference()); in testGetBubblePreference_appAll()
444 assertTrue(mNotificationManager.areBubblesEnabled()); in testAreBubblesEnabled()
454 assertFalse(mNotificationManager.areBubblesEnabled()); in testAreBubblesEnabled_false()
/cts/tests/tests/notificationlegacy/notificationlegacy29/src/android/app/notification/legacy29/cts/
DNotificationManager29Test.java70 private NotificationManager mNotificationManager; field in NotificationManager29Test
78 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
80 mNotificationManager.createNotificationChannel(new NotificationChannel( in setUp()
151 mNotificationManager.notify(id, notification); in testPostFullScreenIntent_noPermission()
165 NotificationManager.Policy origPolicy = mNotificationManager.getNotificationPolicy(); in testApi29CannotToggleConversationsTest()
170 mNotificationManager.setNotificationPolicy(new NotificationManager.Policy( in testApi29CannotToggleConversationsTest()
172 NotificationManager.Policy policy = mNotificationManager.getNotificationPolicy(); in testApi29CannotToggleConversationsTest()
177 mNotificationManager.setNotificationPolicy(origPolicy); in testApi29CannotToggleConversationsTest()
189 NotificationManager.Policy origPolicy = mNotificationManager.getNotificationPolicy(); in testApi29CannotToggleConversationsOffTest()
196 mNotificationManager.setNotificationPolicy(new NotificationManager.Policy(0, 0, 0)); in testApi29CannotToggleConversationsOffTest()
[all …]
DNotificationAssistantServiceTest.java85 private NotificationManager mNotificationManager; field in NotificationAssistantServiceTest
101 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
103 mNotificationManager.createNotificationChannel(new NotificationChannel( in setUp()
113 mNotificationManager.cancelAll(); in tearDown()
407 mNotificationManager.getAllowedAssistantAdjustments(); in testGetAllowedAssistantAdjustments_permission()
681 mNotificationManager.notify(tag, id, notification); in sendNotification()
701 mNotificationManager.notify(id, notification); in sendConversationNotification()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DNotificationTest.java57 private NotificationManager mNotificationManager; field in NotificationTest
63 mNotificationManager = getContext().getSystemService(NotificationManager.class); in setUp()
66 mNotificationManager.createNotificationChannel(channel); in setUp()
74 mNotificationManager.cancelAll(); in tearDown()
82 mNotificationManager.cancelAll(); in testNotificationJobEndDetach()
102 mNotificationManager.getActiveNotifications(); in testNotificationJobEndDetach()
113 StatusBarNotification[] activeNotifications = mNotificationManager.getActiveNotifications(); in testNotificationJobEndDetach()
119 mNotificationManager.cancelAll(); in testNotificationJobEndRemove()
139 mNotificationManager.getActiveNotifications(); in testNotificationJobEndRemove()
151 return mNotificationManager.getActiveNotifications().length == 0; in testNotificationJobEndRemove()
[all …]
/cts/tests/tests/notificationlegacy/notificationlegacy27/src/android/app/notification/legacy/cts/
DLegacyNotificationManagerTest.java74 private NotificationManager mNotificationManager; field in LegacyNotificationManagerTest
90 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
92 mNotificationManager.createNotificationChannel(new NotificationChannel( in setUp()
98 mNotificationManager.cancelAll(); in tearDown()
121 NotificationManager.Policy origPolicy = mNotificationManager.getNotificationPolicy(); in testPrePCannotToggleAlarmsAndMediaTest()
130 mNotificationManager.setNotificationPolicy(new NotificationManager.Policy(0, 0, 0)); in testPrePCannotToggleAlarmsAndMediaTest()
131 NotificationManager.Policy policy = mNotificationManager.getNotificationPolicy(); in testPrePCannotToggleAlarmsAndMediaTest()
140 mNotificationManager.setNotificationPolicy(new NotificationManager.Policy( in testPrePCannotToggleAlarmsAndMediaTest()
143 policy = mNotificationManager.getNotificationPolicy(); in testPrePCannotToggleAlarmsAndMediaTest()
160 NotificationManager.Policy userPolicy = mNotificationManager.getNotificationPolicy(); in testSetNotificationPolicy_preP_setOldFields()
[all …]
/cts/tests/tests/security/src/android/security/cts/AutomaticZenRuleTests/
DAutomaticZenRuleTests.java48 private NotificationManager mNotificationManager = null; field in AutomaticZenRuleTests
59 mNotificationManager = context.getSystemService(NotificationManager.class); in setUp()
66 if (mNotificationManager.isNotificationPolicyAccessGranted()) { in setUp()
94 automaticZenRules = mNotificationManager.getAutomaticZenRules().size(); in testUsingAppComponents()
104 String id = mNotificationManager.addAutomaticZenRule(rule); in testUsingAppComponents()
111 String id = mNotificationManager.addAutomaticZenRule(rule); in testUsingAppComponents()
126 mNotificationManager.getAutomaticZenRules().size() - automaticZenRules; in testUsingAppComponents()
128 mNotificationManager.removeAutomaticZenRule(id); in testUsingAppComponents()
/cts/tests/tests/notification/NotificationApp/src/com/android/test/notificationapp/
DMatchesCallFilterTestActivity.java32 private NotificationManager mNotificationManager; field in MatchesCallFilterTestActivity
42 mNotificationManager = getSystemService(NotificationManager.class); in onCreate()
56 mNotificationManager.matchesCallFilter(mCallDest); in callMatchesCallFilter()
/cts/tests/app/shared/src/android/app/stubs/shared/
DNotificationHelper.java82 private final NotificationManager mNotificationManager; field in NotificationHelper
88 mNotificationManager = mContext.getSystemService(NotificationManager.class); in NotificationHelper()
175 Arrays.asList(mNotificationManager.getActiveNotifications())); in getNotifications()
220 mNotificationManager.setNotificationAssistantAccessGranted(component, true); in enableAssistant()
223 mNotificationManager.isNotificationAssistantAccessGranted(component)); in enableAssistant()
224 assertEquals(component, mNotificationManager.getAllowedNotificationAssistant()); in enableAssistant()
252 mNotificationManager.setNotificationAssistantAccessGranted(component, false); in disableAssistant()
255 !mNotificationManager.isNotificationAssistantAccessGranted(component)); in disableAssistant()
256 assertNotEquals(component, mNotificationManager.getAllowedNotificationAssistant()); in disableAssistant()
DCloseSystemDialogsTestService.java56 private NotificationManager mNotificationManager; field in CloseSystemDialogsTestService
64 mNotificationManager = getSystemService(NotificationManager.class); in onCreate()
180 mNotificationManager.createNotificationChannel(notificationChannel); in notify()
181 mNotificationManager.notify(notificationId, notification); in notify()
DTestNotificationAssistant.java55 private NotificationManager mNotificationManager; field in TestNotificationAssistant
73 mNotificationManager = getSystemService(NotificationManager.class); in onCreate()
93 mCurrentCapabilities = mNotificationManager.getAllowedAssistantAdjustments(); in onListenerConnected()
149 mCurrentCapabilities = mNotificationManager.getAllowedAssistantAdjustments(); in onAllowedAdjustmentsChanged()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DNotificationActivity.java42 NotificationManager mNotificationManager; field in NotificationActivity
52 mNotificationManager = getSystemService(NotificationManager.class); in onCreate()
53 mNotificationManager.createNotificationChannel(new NotificationChannel( in onCreate()
80 mNotificationManager.notify(1, builder); in onResume()
DByodHelperActivity.java179 private NotificationManager mNotificationManager; field in ByodHelperActivity
213 mNotificationManager.notify(NOTIFICATION_ID, notification); in showNotificationInner()
238 mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); in onCreate()
242 mNotificationManager.createNotificationChannel(new NotificationChannel( in onCreate()
365 mNotificationManager.cancel(NOTIFICATION_ID); in onCreate()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20415/src/android/security/cts/CVE_2022_20415/
DDeviceTest.java49 private NotificationManager mNotificationManager; field in DeviceTest
70 mNotificationManager.createNotificationChannel(notificationChannel); in tryNotificationStart()
85 mNotificationManager.notify(mContext.getString(R.string.tagNotify), in tryNotificationStart()
87 mNotificationManager.notify(mResources.getInteger(R.integer.idSummaryNotification), in tryNotificationStart()
95 mNotificationManager = mContext.getSystemService(NotificationManager.class); in testFullScreenIntent()
126 mNotificationManager.cancel(mResources.getInteger(R.integer.idSummaryNotification)); in testFullScreenIntent()
127 mNotificationManager.cancel(mContext.getString(R.string.tagNotify), in testFullScreenIntent()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DBubblesVerifierActivity.java83 private NotificationManager mNotificationManager; field in BubblesVerifierActivity
228 mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); in onCreate()
229 mNotificationManager.createNotificationChannel( in onCreate()
344 mNotificationManager.cancelAll(); in updateViewForCompletionSummary()
366 return mNotificationManager.getBubblePreference() == BUBBLE_PREFERENCE_NONE in verify()
367 && mNotificationManager.areBubblesEnabled(); in verify()
392 mNotificationManager.notify(NOTIFICATION_ID, builder.build()); in performTestAction()
415 return mNotificationManager.getBubblePreference() in verify()
453 return !mNotificationManager.areBubblesEnabled(); in verify()
493 return mNotificationManager.getBubblePreference() == BUBBLE_PREFERENCE_ALL in verify()
[all …]
/cts/tests/tests/notification/NotificationTrampolineBase/src/com/android/test/notificationtrampoline/
DNotificationTrampolineTestService.java70 private NotificationManager mNotificationManager; field in NotificationTrampolineTestService
79 mNotificationManager = getSystemService(NotificationManager.class); in onCreate()
101 mNotificationManager.cancel(notificationId); in onDestroy()
140 long count = Stream.of(mNotificationManager.getActiveNotifications()) in handleMessage()
175 mNotificationManager.createNotificationChannel(notificationChannel); in postNotification()
186 mNotificationManager.notify(GROUP_ID, mGroupSummary); in postNotification()
204 mNotificationManager.notify(notificationId, notification); in postNotification()
209 mNotificationManager.cancelAll(); in cancelAllNotifications()
/cts/tests/tests/notificationlegacy/notificationlegacy28/src/android/app/notification/legacy28/cts/
DNotificationManager28Test.java57 private NotificationManager mNotificationManager; field in NotificationManager28Test
65 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
67 mNotificationManager.createNotificationChannel(new NotificationChannel( in setUp()
99 mNotificationManager.notify(id, notification); in testPostFullScreenIntent_noPermission()
/cts/tests/admin/src/android/admin/cts/
DDevicePolicyManagerTest.java73 private NotificationManager mNotificationManager; field in DevicePolicyManagerTest
107 mNotificationManager = in setUp()
473 NotificationManager.Policy origPolicy = mNotificationManager.getNotificationPolicy(); in testNotificationPolicyAccess()
476 mNotificationManager.isNotificationPolicyAccessGranted()); in testNotificationPolicyAccess()
479 mNotificationManager.setNotificationPolicy(new Policy(0, 0, 0, -1)); in testNotificationPolicyAccess()
486 assertNotEquals(mNotificationManager.getNotificationPolicy(), expected); in testNotificationPolicyAccess()
488 mNotificationManager.setNotificationPolicy(expected); in testNotificationPolicyAccess()
490 NotificationManager.Policy actual = mNotificationManager.getNotificationPolicy(); in testNotificationPolicyAccess()
499 mNotificationManager.setNotificationPolicy(origPolicy); in testNotificationPolicyAccess()
520 mNotificationManager.setInterruptionFilter(interruptionFilter); in setInterruptionFilter()
[all …]
/cts/tests/tests/telecom-apps/ConnectionServiceVoipAppMain/src/android/telecom/cts/apps/connectionservicevoipappmain/
DVoipConnectionServiceControlMain.java87 private NotificationManager mNotificationManager = null; field in VoipConnectionServiceControlMain
460 if (mNotificationManager == null) { in maybeInitNotificationChannel()
461 mNotificationManager = getSystemService(NotificationManager.class); in maybeInitNotificationChannel()
462 mNotificationManager.createNotificationChannel(new NotificationChannel( in maybeInitNotificationChannel()
/cts/tests/tests/telecom-apps/TransactionalVoipAppMain/src/android/telecom/cts/apps/transactionalvoipappmain/
DTransactionalVoipAppControlMain.java79 private NotificationManager mNotificationManager = null; field in TransactionalVoipAppControlMain
488 if (mNotificationManager == null) { in initNotificationChannel()
489 mNotificationManager = getSystemService(NotificationManager.class); in initNotificationChannel()
490 mNotificationManager.createNotificationChannel(new NotificationChannel( in initNotificationChannel()
/cts/tests/tests/widget29/src/android/widget/cts29/
DToastTest.java80 private NotificationManager mNotificationManager; field in ToastTest
90 mNotificationManager = in setup()
93 SystemUtil.runWithShellPermissionIdentity(() -> mNotificationManager in setup()
100 SystemUtil.runWithShellPermissionIdentity(() -> mNotificationManager in teardown()
/cts/tests/tests/telecom/src/android/telecom/cts/
DTransactionalApisTest.java245 private NotificationManager mNotificationManager; field in TransactionalApisTest
251 mNotificationManager = mContext.getSystemService(NotificationManager.class); in setUp()
265 mNotificationManager.deleteNotificationChannel(CALL_CHANNEL_ID); in tearDown()
1433 mNotificationManager.cancel(NOTIFICATION_ID); in cleanup()
1483 mNotificationManager.createNotificationChannel(callsChannel); in configureNotificationChannel()
1498 mNotificationManager.notify(NOTIFICATION_ID, callNot); in postCallNotification()

12