Home
last modified time | relevance | path

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

1234567

/aosp12/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
H A DNotificationControllerTest.java51 private NotificationManager mNotificationManager; field in NotificationControllerTest
75 verify(mNotificationManager).cancel(1); in testShouldShowNotificationFirstTime()
91 reset(mNotificationManager); in testNotificationNotShownIfShownTooManyTimes()
95 verifyZeroInteractions(mNotificationManager); in testNotificationNotShownIfShownTooManyTimes()
111 reset(mNotificationManager); in testNotificationNotShownIfDismissedTooManyTimes()
115 verifyZeroInteractions(mNotificationManager); in testNotificationNotShownIfDismissedTooManyTimes()
125 verify(mNotificationManager).cancel(1); in testDismissNotificationDelay()
127 reset(mNotificationManager); in testDismissNotificationDelay()
131 verifyZeroInteractions(mNotificationManager); in testDismissNotificationDelay()
147 verify(mNotificationManager).cancel(1); in testNoThanksNotificationDelay()
[all …]
/aosp12/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
H A DWifiNotificationManagerTest.java50 @Mock private NotificationManager mNotificationManager; field in WifiNotificationManagerTest
66 .thenReturn(mNotificationManager); in setUp()
75 verify(mNotificationManager, never()).notify(anyString(), anyInt(), any()); in testNotify()
78 verify(mNotificationManager).createNotificationChannels(any()); in testNotify()
86 verify(mNotificationManager, never()).cancel(anyString(), anyInt()); in testCancel()
89 verify(mNotificationManager).createNotificationChannels(any()); in testCancel()
91 verify(mNotificationManager).cancel(eq(NOTIFICATION_TAG), eq(TEST_MESSAGE_ID)); in testCancel()
97 verify(mNotificationManager).createNotificationChannels(any()); in testUserSwitchNotificationSendCorrect()
101 clearInvocations(mNotificationManager); in testUserSwitchNotificationSendCorrect()
102 when(mNotificationManager.getActiveNotifications()) in testUserSwitchNotificationSendCorrect()
[all …]
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/
H A DWifiNotificationManager.java45 private NotificationManager mNotificationManager; field in WifiNotificationManager
65 if (mNotificationManager != null) { in createNotificationChannels()
69 mNotificationManager = getNotificationManagerForCurrentUser(); in createNotificationChannels()
70 if (mNotificationManager == null) { in createNotificationChannels()
97 mNotificationManager.createNotificationChannels(channelsList); in createNotificationChannels()
112 if (mNotificationManager == null) { in notify()
115 mNotificationManager.notify(NOTIFICATION_TAG, id, notification); in notify()
122 if (mNotificationManager == null) { in cancel()
125 mNotificationManager.cancel(NOTIFICATION_TAG, id); in cancel()
132 if (mNotificationManager == null) { in getActiveNotifications()
[all …]
H A DSoftApNotifier.java44 private final WifiNotificationManager mNotificationManager; field in SoftApNotifier
50 mNotificationManager = wifiNotificationManager; in SoftApNotifier()
57 mNotificationManager.notify(NOTIFICATION_ID_SOFTAP_AUTO_DISABLED, in showSoftApShutdownTimeoutExpiredNotification()
66 mNotificationManager.cancel(NOTIFICATION_ID_SOFTAP_AUTO_DISABLED); in dismissSoftApShutdownTimeoutExpiredNotification()
/aosp12/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
H A DNetworkNotificationManagerTest.java144 @Mock NotificationManager mNotificationManager; field in NetworkNotificationManagerTest
172 .thenReturn(mNotificationManager); in setUp()
198 verify(mNotificationManager, times(1)) in verifyTitleByNetwork()
250 verify(mNotificationManager, times(1)).cancel(eq(tag), eq(eventId)); in testNotificationsShownAndCleared()
262 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testNoInternetNotificationsNotShownForCellular()
268 verify(mNotificationManager, times(1)).notify(eq(tag), eq(eventId), any()); in testNoInternetNotificationsNotShownForCellular()
279 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testNotificationsNotShownIfNoInternetCapability()
345 reset(mNotificationManager); in testDuplicatedNotificationsSignInThenNoInternet()
349 verify(mNotificationManager, never()).cancel(any(), anyInt()); in testDuplicatedNotificationsSignInThenNoInternet()
350 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testDuplicatedNotificationsSignInThenNoInternet()
[all …]
/aosp12/frameworks/base/libs/WindowManager/Shell/tests/flicker/test-apps/flickerapp/src/com/android/wm/shell/flicker/testapp/
H A DBubbleHelper.java46 private NotificationManager mNotificationManager; field in BubbleHelper
75 mNotificationManager = context.getSystemService(NotificationManager.class); in BubbleHelper()
81 mNotificationManager.createNotificationChannel(channel); in BubbleHelper()
112 mNotificationManager.notify(info.id, notification); in addNewBubble()
157 mNotificationManager.cancel(id); in cancel()
161 mNotificationManager.cancelAll(); in cancelAll()
165 StatusBarNotification[] activeNotifications = mNotificationManager.getActiveNotifications(); in cancelLast()
167 mNotificationManager.cancel( in cancelLast()
173 StatusBarNotification[] activeNotifications = mNotificationManager.getActiveNotifications(); in cancelFirst()
175 mNotificationManager.cancel(activeNotifications[0].getId()); in cancelFirst()
/aosp12/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DCarrierServiceStateTrackerTest.java63 NotificationManager mNotificationManager; field in CarrierServiceStateTrackerTest
77 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
103 doReturn(mNotificationManager).when(mSpyCarrierSST).getNotificationManager(any()); in testCancelBothNotifications()
106 verify(mNotificationManager).cancel( in testCancelBothNotifications()
108 verify(mNotificationManager).cancel( in testCancelBothNotifications()
127 verify(mNotificationManager).notify( in testSendBothNotifications()
130 verify(mNotificationManager).notify( in testSendBothNotifications()
168 verify(mNotificationManager, atLeast(1)).notify( in testSendPrefNetworkNotification()
181 verify(mNotificationManager, atLeast(1)).cancel( in testSendPrefNetworkNotification()
210 verify(mNotificationManager).notify( in testSendEmergencyNetworkNotification()
[all …]
/aosp12/frameworks/base/core/tests/notificationtests/src/android/app/
H A DNotificationStressTest.java62 private NotificationManager mNotificationManager; field in NotificationStressTest
71 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
74 mNotificationManager.cancelAll(); in setUp()
80 mNotificationManager.cancelAll(); in tearDown()
89 mNotificationManager.cancel(mNotifyId - 4); in testNotificationStress()
102 assertTrue(mNotificationManager.getActiveNotifications().length == MAX_NOTIFCATIONS); in testNotificationsWithShadeStress()
104 mNotificationManager.cancel(--mNotifyId); in testNotificationsWithShadeStress()
127 mNotificationManager.notify(id, notification); in sendNotification()
/aosp12/packages/apps/Car/Settings/src/com/android/car/settings/notifications/
H A DBaseNotificationsPreferenceController.java47 public INotificationManager mNotificationManager = INotificationManager.Stub.asInterface( field in BaseNotificationsPreferenceController
65 if (mNotificationManager.onlyHasDefaultChannel(packageName, uid)) { in toggleNotificationsSetting()
67 mNotificationManager.getNotificationChannelForPackage( in toggleNotificationsSetting()
74 mNotificationManager in toggleNotificationsSetting()
77 mNotificationManager.setNotificationsEnabledForPackage(packageName, uid, enabled); in toggleNotificationsSetting()
94 return mNotificationManager.areNotificationsEnabledForPackage(packageName, uid); in areNotificationsEnabled()
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/ingest/
H A DIngestService.java78 private NotificationManager mNotificationManager; field in IngestService
87 mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); in onCreate()
159 mNotificationManager.notify(R.id.ingest_notification_scanning, in setClientActivity()
164 mNotificationManager.cancel(R.id.ingest_notification_importing); in setClientActivity()
165 mNotificationManager.cancel(R.id.ingest_notification_scanning); in setClientActivity()
214 mNotificationManager.cancel(R.id.ingest_notification_scanning); in deviceRemoved()
215 mNotificationManager.cancel(R.id.ingest_notification_importing); in deviceRemoved()
234 mNotificationManager.notify(R.id.ingest_notification_importing, in onImportProgress()
251 mNotificationManager.notify(R.id.ingest_notification_importing, in onImportFinish()
268 mNotificationManager.notify(R.id.ingest_notification_scanning, in onObjectIndexed()
[all …]
/aosp12/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
H A DIncomingCallNotifierTest.java57 private NotificationManager mNotificationManager; field in IncomingCallNotifierTest
68 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
98 verify(mNotificationManager, never()).notify(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testSingleCall()
110 verify(mNotificationManager, never()).notify(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testIncomingDuringOngoingCall()
126 verify(mNotificationManager, never()).notify(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testIncomingDuringOngoingCall2()
142 verify(mNotificationManager).notify(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testCallRemoved()
145 verify(mNotificationManager).cancel(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testCallRemoved()
164 verify(mNotificationManager, never()).notify(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testDontShowDuringHandover1()
183 verify(mNotificationManager, never()).notify(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testDontShowDuringHandover2()
H A DDisconnectedCallNotifierTest.java52 private NotificationManager mNotificationManager; field in DisconnectedCallNotifierTest
61 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp()
84 verify(mNotificationManager, never()).notifyAsUser(anyString(), anyInt(), in testNotificationShownAfterEmergencyCall()
90 verify(mNotificationManager).notifyAsUser(anyString(), anyInt(), in testNotificationShownAfterEmergencyCall()
107 verify(mNotificationManager, never()).notifyAsUser(anyString(), anyInt(), in testNotificationShownForDisconnectedEmergencyCall()
113 verify(mNotificationManager).notifyAsUser(anyString(), anyInt(), in testNotificationShownForDisconnectedEmergencyCall()
129 verify(mNotificationManager, never()).notifyAsUser(anyString(), anyInt(), in testNotificationNotShownAfterCall()
134 verify(mNotificationManager, never()).notifyAsUser(anyString(), anyInt(), in testNotificationNotShownAfterCall()
146 verify(mNotificationManager).cancelAsUser(anyString(), anyInt(), any()); in testNotificationClearedForEmergencyCall()
/aosp12/frameworks/base/services/core/java/com/android/server/wm/
H A DAlertWindowNotification.java54 private final NotificationManager mNotificationManager; field in AlertWindowNotification
61 mNotificationManager = in AlertWindowNotification()
87 mNotificationManager.cancel(mNotificationTag, NOTIFICATION_ID); in onCancelNotification()
89 mNotificationManager.deleteNotificationChannel(mNotificationTag); in onCancelNotification()
134 mNotificationManager.notify(mNotificationTag, NOTIFICATION_ID, builder.build()); in onPostNotification()
151 mNotificationManager.createNotificationChannelGroup(sChannelGroup); in createNotificationChannel()
157 NotificationChannel channel = mNotificationManager.getNotificationChannel(mNotificationTag); in createNotificationChannel()
167 mNotificationManager.createNotificationChannel(channel); in createNotificationChannel()
/aosp12/packages/apps/DocumentsUI/tests/common/com/android/documentsui/services/
H A DTestForegroundManager.java26 private final TestNotificationManager mNotificationManager; field in TestForegroundManager
32 mNotificationManager = notificationManager; in TestForegroundManager()
39 mNotificationManager.notify(null, mForegroundId, mForegroundNotification); in startForeground()
44 mNotificationManager.cancel(null, mForegroundId); in stopForeground()
/aosp12/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/common/
H A DNotificationHelperTest.java44 private NotificationManager mNotificationManager = field in NotificationHelperTest
54 assertThat(shadowOf(mNotificationManager).getActiveNotifications()).hasLength(1); in showResumeNotification_showsExpectedNotification()
56 shadowOf(mNotificationManager).getActiveNotifications()[0]; in showResumeNotification_showsExpectedNotification()
68 assertThat(shadowOf(mNotificationManager).getActiveNotifications()).hasLength(1); in showPrivacyReminderNotification_showsExpectedNotification()
70 shadowOf(mNotificationManager).getActiveNotifications()[0]; in showPrivacyReminderNotification_showsExpectedNotification()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/
H A DWindowMagnificationPromptControllerTest.java63 private NotificationManager mNotificationManager; field in WindowMagnificationPromptControllerTest
76 mTestableContext.addMockSystemService(NotificationManager.class, mNotificationManager); in setUp()
92 verify(mNotificationManager).notify(eq(NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE), any( in showNotificationIfNeeded_promptSettingsIsOn_showNotification()
103 verify(mNotificationManager).cancel(NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE); in tapTurnOnAction_isShown_cancelNotificationAndLaunchMagnificationSettings()
126 verify(mNotificationManager).cancel(NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE); in tapDismissAction_isShown_cancelNotificationAndUnregisterReceiver()
136 verify(mNotificationManager).cancel(NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE); in promptSettingsChangeToFalse_isShown_cancelNotificationAndUnregisterReceiver()
146 verify(mNotificationManager).cancel(NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE); in onDestroy_isShown_cancelNotificationAndUnregisterReceiver()
/aosp12/packages/services/Mtp/src/com/android/mtp/
H A DMtpDocumentsService.java43 private NotificationManager mNotificationManager; field in MtpDocumentsService
54 mNotificationManager = getSystemService(NotificationManager.class); in onCreate()
93 mNotificationManager.notify(ids[i], notifications[i]); in updateForegroundState()
99 mNotificationManager.getActiveNotifications(); in updateForegroundState()
102 mNotificationManager.cancel(notification.getId()); in updateForegroundState()
/aosp12/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/specialaccess/
H A DNotificationAccessPreferenceControllerTest.java75 private NotificationManager mNotificationManager; field in NotificationAccessPreferenceControllerTest
94 mNotificationManager = spy(mContext.getSystemService(NotificationManager.class)); in setUp()
97 mCarUxRestrictions, mNotificationManager); in setUp()
181 assertThat(mNotificationManager.isNotificationListenerAccessGranted(mListenerComponent)) in revokeConfirmed_revokesNotificationAccess()
199 mNotificationManager.setNotificationPolicyAccessGranted( in revokeConfirmed_notificationPolicyAccessNotGranted_removesAutomaticZenRules()
206 verify(mNotificationManager).removeAutomaticZenRules(any()); in revokeConfirmed_notificationPolicyAccessNotGranted_removesAutomaticZenRules()
224 assertThat(mNotificationManager.isNotificationListenerAccessGranted(mListenerComponent)) in grantConfirmed_grantsNotificationAccess()
234 mNotificationManager.setNotificationListenerAccessGranted(mListenerComponent, in setupPreferenceController()
/aosp12/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/conditional/
H A DDndConditionCardController.java48 private final NotificationManager mNotificationManager; field in DndConditionCardController
54 mNotificationManager = mAppContext.getSystemService(NotificationManager.class); in DndConditionCardController()
65 return mNotificationManager.getZenMode() != Settings.Global.ZEN_MODE_OFF; in isDisplayable()
89 mNotificationManager.setZenMode(Settings.Global.ZEN_MODE_OFF, null, TAG); in onActionClick()
118 if (ZenModeConfig.areAllZenBehaviorSoundsMuted(mNotificationManager.getZenModeConfig())) { in getSummary()
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/sim/
H A DSimSelectNotificationTest.java84 private NotificationManager mNotificationManager; field in SimSelectNotificationTest
117 .thenReturn(mNotificationManager); in setUp()
119 .thenReturn(mNotificationManager); in setUp()
169 verify(mNotificationManager).createNotificationChannel(nc.capture()); in onReceiveEnableMms_notificationShouldSend()
177 verify(mNotificationManager).notify( in onReceiveEnableMms_notificationShouldSend()
192 verify(mNotificationManager, never()).createNotificationChannel(any()); in onReceiveEnableMms_NoExtra_notificationShouldNotSend()
205 verify(mNotificationManager, never()).createNotificationChannel(any()); in onReceiveEnableMms_MmsDataAlreadyEnabled_notificationShouldNotSend()
214 verify(mNotificationManager, never()).createNotificationChannel(any()); in onReceivePrimarySubListChange_NoExtra_notificationShouldNotSend()
273 verify(mNotificationManager).createNotificationChannel(nc.capture()); in onReceivePrimarySubListChange_DualCdmaWarning_notificationShouldSend()
281 verify(mNotificationManager).notify( in onReceivePrimarySubListChange_DualCdmaWarning_notificationShouldSend()
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/
H A DNotificationsPreference.java42 private final INotificationManager mNotificationManager; field in NotificationsPreference
49 mNotificationManager = NotificationManager.getService(); in NotificationsPreference()
69 mNotificationManager.areNotificationsEnabledForPackage(mEntry.info.packageName, in refresh()
92 mNotificationManager.setNotificationsEnabledForPackage( in setNotificationsEnabled()
115 final boolean enabled = mNotificationManager.areNotificationsEnabledForPackage(pkg, in getNotificationsBanned()
/aosp12/packages/apps/Settings/src/com/android/settings/sim/
H A DSimActivationNotifier.java81 private final NotificationManager mNotificationManager; field in SimActivationNotifier
85 mNotificationManager = context.getSystemService(NotificationManager.class); in SimActivationNotifier()
86 mNotificationManager.createNotificationChannel( in SimActivationNotifier()
91 mNotificationManager.createNotificationChannel( in SimActivationNotifier()
156 mNotificationManager.notify(SIM_ACTIVATION_NOTIFICATION_ID, builder.build()); in sendNetworkConfigNotification()
188 mNotificationManager.notify(SWITCH_TO_REMOVABLE_SLOT_NOTIFICATION_ID, builder.build()); in sendSwitchedToRemovableSlotNotification()
215 mNotificationManager.notify(SIM_ACTIVATION_NOTIFICATION_ID, builder.build()); in sendEnableDsdsNotification()
/aosp12/packages/apps/Car/Dialer/src/com/android/car/dialer/notification/
H A DInCallNotificationController.java56 private final NotificationManager mNotificationManager; field in InCallNotificationController
67 mNotificationManager = in InCallNotificationController()
73 mNotificationManager.createNotificationChannel(notificationChannel); in InCallNotificationController()
111 mNotificationManager.notify( in showInCallNotification()
124 mNotificationManager.notify( in showInCallNotification()
150 mNotificationManager.cancel(callId, NOTIFICATION_ID); in cancelInCallNotification()
/aosp12/packages/services/Telecomm/src/com/android/server/telecom/ui/
H A DAudioProcessingNotification.java40 private final NotificationManager mNotificationManager; field in AudioProcessingNotification
45 mNotificationManager = in AudioProcessingNotification()
95 mNotificationManager.notify( in showAudioProcessingNotification()
101 mNotificationManager.cancel(NOTIFICATION_TAG, AUDIO_PROCESSING_NOTIFICATION_ID); in cancelAudioProcessingNotification()
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/
H A DZenModeBackendTest.java55 private NotificationManager mNotificationManager; field in ZenModeBackendTest
68 shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNotificationManager); in setup()
195 when(mNotificationManager.getNotificationPolicy()).thenReturn( in saveConversationSenders_importantToNone()
207 verify(mNotificationManager, times(1)).setNotificationPolicy(captor.capture()); in saveConversationSenders_importantToNone()
220 when(mNotificationManager.getNotificationPolicy()).thenReturn(new Policy( in saveConversationSenders_noneToAll()
231 verify(mNotificationManager, times(1)).setNotificationPolicy(captor.capture()); in saveConversationSenders_noneToAll()
244 when(mNotificationManager.getNotificationPolicy()).thenReturn( in saveSenders_doesNotChangeConversations()
256 verify(mNotificationManager, times(1)).setNotificationPolicy(captor.capture()); in saveSenders_doesNotChangeConversations()

1234567