/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/ |
D | NotificationControllerTest.java | 51 private NotificationManager mNotificationManager; field in NotificationControllerTest 60 application.setSystemService(Context.NOTIFICATION_SERVICE, mNotificationManager); in setUp() 72 verify(mNotificationManager).notify(anyInt(), any(Notification.class)); in testShouldShowNotificationFirstTime() 75 verify(mNotificationManager).cancel(1); in testShouldShowNotificationFirstTime() 84 verify(mNotificationManager, times(i)).notify(anyInt(), any(Notification.class)); in testNotificationNotShownIfShownTooManyTimes() 87 verify(mNotificationManager, times(i)).cancel(1); in testNotificationNotShownIfShownTooManyTimes() 91 reset(mNotificationManager); in testNotificationNotShownIfShownTooManyTimes() 95 verifyNoInteractions(mNotificationManager); in testNotificationNotShownIfShownTooManyTimes() 104 verify(mNotificationManager, times(i + 1)).notify(anyInt(), any(Notification.class)); in testNotificationNotShownIfDismissedTooManyTimes() 107 verify(mNotificationManager, times(i + 1)).cancel(1); in testNotificationNotShownIfDismissedTooManyTimes() [all …]
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WifiNotificationManagerTest.java | 52 @Mock private NotificationManager mNotificationManager; field in WifiNotificationManagerTest 69 .thenReturn(mNotificationManager); in setUp() 78 verify(mNotificationManager, never()).notify(anyString(), anyInt(), any()); in testNotify() 81 verify(mNotificationManager).createNotificationChannels(any()); in testNotify() 83 verify(mNotificationManager).notify(eq(NOTIFICATION_TAG), eq(TEST_MESSAGE_ID), any()); in testNotify() 89 verify(mNotificationManager, never()).cancel(anyString(), anyInt()); in testCancel() 92 verify(mNotificationManager).createNotificationChannels(any()); in testCancel() 94 verify(mNotificationManager).cancel(eq(NOTIFICATION_TAG), eq(TEST_MESSAGE_ID)); in testCancel() 100 verify(mNotificationManager).createNotificationChannels(any()); in testUserSwitchNotificationSendCorrect() 102 verify(mNotificationManager).notify(eq(NOTIFICATION_TAG), eq(TEST_MESSAGE_ID), any()); in testUserSwitchNotificationSendCorrect() [all …]
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | WifiNotificationManager.java | 48 private NotificationManager mNotificationManager; field in WifiNotificationManager 70 if (mNotificationManager != null) { in createNotificationChannels() 74 mNotificationManager = getNotificationManagerForCurrentUser(); in createNotificationChannels() 75 if (mNotificationManager == null) { in createNotificationChannels() 110 mNotificationManager.createNotificationChannels(channelsList); in createNotificationChannels() 126 if (mNotificationManager == null) { in notify() 129 mNotificationManager.notify(NOTIFICATION_TAG, id, notification); in notify() 136 if (mNotificationManager == null) { in cancel() 139 mNotificationManager.cancel(NOTIFICATION_TAG, id); in cancel() 146 if (mNotificationManager == null) { in getActiveNotifications() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/modes/ |
D | ZenModesBackend.java | 60 private final NotificationManager mNotificationManager; field in ZenModesBackend 75 mNotificationManager = context.getSystemService(NotificationManager.class); in ZenModesBackend() 80 ZenModeConfig currentConfig = mNotificationManager.getZenModeConfig(); in getModes() 83 Map<String, AutomaticZenRule> zenRules = mNotificationManager.getAutomaticZenRules(); in getModes() 104 ZenModeConfig currentConfig = mNotificationManager.getZenModeConfig(); in getMode() 108 AutomaticZenRule rule = mNotificationManager.getAutomaticZenRule(id); in getMode() 194 mNotificationManager.setNotificationPolicy(dndPolicy, /* fromUser= */ true); in updateMode() 196 mNotificationManager.setManualZenRuleDeviceEffects( in updateMode() 202 mNotificationManager.updateAutomaticZenRule(mode.getId(), mode.getRule(), in updateMode() 214 mNotificationManager.setZenMode(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS, in activateMode() [all …]
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | NetworkNotificationManagerTest.java | 162 @Mock NotificationManager mNotificationManager; field in NetworkNotificationManagerTest 193 doReturn(mNotificationManager).when(mCtx) in setUp() 223 verify(mNotificationManager, times(1)) in verifyTitleByNetwork() 274 verify(mNotificationManager, times(1)).notify(eq(tag), eq(eventId), any()); in testNotificationsShownAndCleared() 275 verify(mNotificationManager, times(1)).cancel(eq(tag), eq(eventId)); in testNotificationsShownAndCleared() 287 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testNoInternetNotificationsNotShownForCellular() 293 verify(mNotificationManager, times(1)).notify(eq(tag), eq(eventId), any()); in testNoInternetNotificationsNotShownForCellular() 304 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testNotificationsNotShownIfNoInternetCapability() 310 verify(mNotificationManager, times(1)).notify(eq(TEST_NOTIF_TAG), eq(type.eventId), in assertNotification() 326 verify(mNotificationManager, times(1)).cancel(eq(TEST_NOTIF_TAG), eq(NO_INTERNET.eventId)); in testDuplicatedNotificationsNoInternetThenSignIn() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/ |
D | IngestService.java | 78 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 …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/notifications/ |
D | BaseNotificationsPreferenceController.java | 53 public INotificationManager mNotificationManager = INotificationManager.Stub.asInterface( field in BaseNotificationsPreferenceController 71 if (mNotificationManager.onlyHasDefaultChannel(packageName, uid)) { in toggleNotificationsSetting() 73 mNotificationManager.getNotificationChannelForPackage( in toggleNotificationsSetting() 80 mNotificationManager in toggleNotificationsSetting() 83 mNotificationManager.setNotificationsEnabledForPackage(packageName, uid, enabled); in toggleNotificationsSetting() 100 return mNotificationManager.areNotificationsEnabledForPackage(packageName, uid); in areNotificationsEnabled() 118 if (mNotificationManager.isImportanceLocked(packageName, uid)) { in areNotificationsChangeable()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenModeBackendTest.java | 53 private NotificationManager mNotificationManager; field in ZenModeBackendTest 66 shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNotificationManager); in setup() 193 when(mNotificationManager.getNotificationPolicy()).thenReturn( in saveConversationSenders_importantToNone() 206 verify(mNotificationManager).setNotificationPolicy(captor.capture(), eq(true)); in saveConversationSenders_importantToNone() 208 verify(mNotificationManager).setNotificationPolicy(captor.capture()); in saveConversationSenders_importantToNone() 222 when(mNotificationManager.getNotificationPolicy()).thenReturn(new Policy( in saveConversationSenders_noneToAll() 234 verify(mNotificationManager).setNotificationPolicy(captor.capture(), eq(true)); in saveConversationSenders_noneToAll() 236 verify(mNotificationManager).setNotificationPolicy(captor.capture()); in saveConversationSenders_noneToAll() 250 when(mNotificationManager.getNotificationPolicy()).thenReturn( in saveSenders_doesNotChangeConversations() 263 verify(mNotificationManager).setNotificationPolicy(captor.capture(), eq(true)); in saveSenders_doesNotChangeConversations() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | DisconnectedCallNotifierTest.java | 52 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()
|
D | IncomingCallNotifierTest.java | 58 private NotificationManager mNotificationManager; field in IncomingCallNotifierTest 69 mNotificationManager = (NotificationManager) mContext.getSystemService( in setUp() 103 verify(mNotificationManager, never()).notifyAsUser( in testSingleCall() 117 verify(mNotificationManager, never()).notifyAsUser( in testIncomingDuringOngoingCall() 135 verify(mNotificationManager, never()).notifyAsUser( in testIncomingDuringOngoingCall2() 153 verify(mNotificationManager).notifyAsUser( in testCallRemoved() 158 verify(mNotificationManager).cancelAsUser(eq(IncomingCallNotifier.NOTIFICATION_TAG), in testCallRemoved() 177 verify(mNotificationManager, never()).notifyAsUser( in testDontShowDuringHandover1() 198 verify(mNotificationManager, never()).notifyAsUser( in testDontShowDuringHandover2()
|
/packages/apps/Settings/src/com/android/settings/development/ |
D | PageAgnosticNotificationService.java | 41 private NotificationManager mNotificationManager; field in PageAgnosticNotificationService 56 mNotificationManager = getSystemService(NotificationManager.class); in createNotificationChannel() 57 if (mNotificationManager != null) { in createNotificationChannel() 58 mNotificationManager.createNotificationChannel(channel); in createNotificationChannel() 131 if (mNotificationManager != null) { in onStartCommand() 132 mNotificationManager.notify(NOTIFICATION_ID, notification); in onStartCommand()
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/conditional/ |
D | DndConditionCardController.java | 49 private final NotificationManager mNotificationManager; field in DndConditionCardController 55 mNotificationManager = mAppContext.getSystemService(NotificationManager.class); in DndConditionCardController() 66 return mNotificationManager.getZenMode() != Settings.Global.ZEN_MODE_OFF; in isDisplayable() 91 mNotificationManager.setZenMode(Settings.Global.ZEN_MODE_OFF, null, TAG, in onActionClick() 94 mNotificationManager.setZenMode(Settings.Global.ZEN_MODE_OFF, null, TAG); in onActionClick() 124 if (ZenModeConfig.areAllZenBehaviorSoundsMuted(mNotificationManager.getZenModeConfig())) { in getSummary()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/ |
D | NotificationsPreference.java | 41 private final INotificationManager mNotificationManager; field in NotificationsPreference 48 mNotificationManager = NotificationManager.getService(); in NotificationsPreference() 68 mNotificationManager.areNotificationsEnabledForPackage(mEntry.info.packageName, in refresh() 91 mNotificationManager.setNotificationsEnabledForPackage( in setNotificationsEnabled() 114 final boolean enabled = mNotificationManager.areNotificationsEnabledForPackage(pkg, in getNotificationsBanned() 141 return mNotificationManager.isImportanceLocked(app.packageName, in isNonBlockablePackage()
|
/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/common/ |
D | NotificationHelperTest.java | 44 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()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/services/ |
D | TestForegroundManager.java | 26 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()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/specialaccess/ |
D | NotificationAccessPreferenceControllerTest.java | 78 private NotificationManager mNotificationManager; field in NotificationAccessPreferenceControllerTest 99 mNotificationManager = spy(mContext.getSystemService(NotificationManager.class)); in setUp() 102 mCarUxRestrictions, mNotificationManager); in setUp() 141 mCarUxRestrictions, mNotificationManager); in onStart_loadsFixedPackage_preferenceDisabled() 212 assertThat(mNotificationManager.isNotificationListenerAccessGranted(mListenerComponent)) in revokeConfirmed_revokesNotificationAccess() 230 mNotificationManager.setNotificationPolicyAccessGranted( in revokeConfirmed_notificationPolicyAccessNotGranted_removesAutomaticZenRules() 237 verify(mNotificationManager).removeAutomaticZenRules(any()); in revokeConfirmed_notificationPolicyAccessNotGranted_removesAutomaticZenRules() 255 assertThat(mNotificationManager.isNotificationListenerAccessGranted(mListenerComponent)) in grantConfirmed_grantsNotificationAccess() 265 mNotificationManager.setNotificationListenerAccessGranted(mListenerComponent, in setupPreferenceController()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/device/apps/ |
D | NotificationsPreferenceController.java | 44 private final INotificationManager mNotificationManager; field in NotificationsPreferenceController 51 mNotificationManager = NotificationManager.getService(); in NotificationsPreferenceController() 82 mNotificationManager.areNotificationsEnabledForPackage( in update() 109 final boolean enabled = mNotificationManager.areNotificationsEnabledForPackage(pkg, in getNotificationsBanned() 137 return mNotificationManager.isImportanceLocked(app.packageName, in isNonBlockablePackage() 158 mNotificationManager.setNotificationsEnabledForPackage( in setNotificationsEnabled()
|
/packages/services/Telecomm/testapps/transactionalVoipApp/src/com/android/server/telecom/transactionalVoipApp/ |
D | BackgroundIncomingCallService.java | 33 private NotificationManager mNotificationManager; field in BackgroundIncomingCallService 39 mNotificationManager = getSystemService(NotificationManager.class); in onCreate() 48 if (mNotificationManager != null) { in onStartCommand() 49 mNotificationManager.createNotificationChannel(new NotificationChannel( in onStartCommand()
|
/packages/modules/AdServices/adservices/apk/tests/notification/src/com/android/adservices/ui/notifications/ |
D | ConsentNotificationTriggerTest.java | 118 private NotificationManager mNotificationManager; field in ConsentNotificationTriggerTest 130 mNotificationManager = mSpyContext.getSystemService(NotificationManager.class); in setUp() 184 assertThat(mNotificationManager.getActiveNotifications()).hasLength(1); in testEuNotification_gaUxFlagEnabled() 186 mNotificationManager.getActiveNotifications()[0].getNotification(); in testEuNotification_gaUxFlagEnabled() 223 assertThat(mNotificationManager.getActiveNotifications()).hasLength(0); in testEuNotification_gaUxFlagEnabled() 254 assertThat(mNotificationManager.getActiveNotifications()).hasLength(1); in testNonEuNotifications_gaUxEnabled() 256 mNotificationManager.getActiveNotifications()[0].getNotification(); in testNonEuNotifications_gaUxEnabled() 298 assertThat(mNotificationManager.getActiveNotifications()).hasLength(1); in testEuNotifications_gaUxEnabled_nonDismissable() 300 mNotificationManager.getActiveNotifications()[0].getNotification(); in testEuNotifications_gaUxEnabled_nonDismissable() 347 assertThat(mNotificationManager.getActiveNotifications()).hasLength(0); in testEuNotifications_gaUxEnabled_nonDismissable() [all …]
|
/packages/services/Mtp/src/com/android/mtp/ |
D | MtpDocumentsService.java | 43 private NotificationManager mNotificationManager; field in MtpDocumentsService 54 mNotificationManager = getSystemService(NotificationManager.class); in onCreate() 95 mNotificationManager.notify(ids[i], notifications[i]); in updateForegroundState() 101 mNotificationManager.getActiveNotifications(); in updateForegroundState() 104 mNotificationManager.cancel(notification.getId()); in updateForegroundState()
|
/packages/services/Telephony/tests/src/com/android/phone/ |
D | NotificationMgrTest.java | 121 @Mock NotificationManager mNotificationManager; field in NotificationMgrTest 178 when(mApp.getSystemService(Context.NOTIFICATION_SERVICE)).thenReturn(mNotificationManager); in setUp() 205 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testUpdateCfi_visible_noActiveSubscription_notificationNeverSent() 249 verify(mNotificationManager).cancel(any(), anyInt()); in testUpdateCfi_invisible_hasUnmanagedProfile_notificationCanceled() 258 verify(mNotificationManager, never()).cancel(any(), anyInt()); in testUpdateCfi_invisible_allProfilesAreManaged_notificationNeverCanceled() 281 verify(mNotificationManager).cancel(any(), eq(DATA_ROAMING_NOTIFICATION)); in testHideDataRoamingNotification() 292 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testUpdateNetworkSelection_justOutOfService_notificationNeverSent() 333 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testUpdateNetworkSelection_invalidSubscription_notificationNotSent() 346 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testUpdateNetworkSelection_nullCarrierConfig_notificationNotSent() 366 verify(mNotificationManager, never()).notify(any(), anyInt(), any()); in testUpdateNetworkSelection_userNotAllowedToChooseOperator_notificationNotSent() [all …]
|
/packages/apps/Settings/src/com/android/settings/sim/ |
D | SimActivationNotifier.java | 81 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()
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenModeBackend.java | 66 private final NotificationManager mNotificationManager; field in ZenModeBackend 80 mNotificationManager = (NotificationManager) context.getSystemService( in ZenModeBackend() 87 if (mNotificationManager != null) { in updatePolicy() 88 mPolicy = mNotificationManager.getNotificationPolicy(); in updatePolicy() 99 return mNotificationManager.updateAutomaticZenRule(id, rule, /* fromUser= */ true); in updateZenRule() 107 mNotificationManager.setZenMode(zenMode, null, TAG, /* fromUser= */ true); in setZenMode() 118 mNotificationManager.setZenMode(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS, in setZenModeForDuration() 121 mNotificationManager.setZenMode(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS, in setZenModeForDuration() 197 mNotificationManager.setNotificationPolicy(mPolicy, /* fromUser= */ true); in savePolicy() 199 mNotificationManager.setNotificationPolicy(mPolicy); in savePolicy() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/sim/ |
D | SimSelectNotificationTest.java | 91 private NotificationManager mNotificationManager; field in SimSelectNotificationTest 126 .thenReturn(mNotificationManager); in setUp() 128 .thenReturn(mNotificationManager); in setUp() 181 verify(mNotificationManager).createNotificationChannel(nc.capture()); in onReceiveEnableMms_notificationShouldSend() 189 verify(mNotificationManager).notify( in onReceiveEnableMms_notificationShouldSend() 204 verify(mNotificationManager, never()).createNotificationChannel(any()); in onReceiveEnableMms_NoExtra_notificationShouldNotSend() 217 verify(mNotificationManager, never()).createNotificationChannel(any()); in onReceiveEnableMms_MmsDataAlreadyEnabled_notificationShouldNotSend() 226 verify(mNotificationManager, never()).createNotificationChannel(any()); in onReceivePrimarySubListChange_NoExtra_notificationShouldNotSend() 290 verify(mNotificationManager).createNotificationChannel(nc.capture()); in onReceivePrimarySubListChange_DualCdmaWarning_notificationShouldSend() 298 verify(mNotificationManager).notify( in onReceivePrimarySubListChange_DualCdmaWarning_notificationShouldSend()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/ |
D | AutoGrantPermissionsNotifier.java | 99 private final NotificationManager mNotificationManager; field in AutoGrantPermissionsNotifier 104 mNotificationManager = getSystemServiceSafe(context, NotificationManager.class); in AutoGrantPermissionsNotifier() 124 mNotificationManager.createNotificationChannel(autoGrantedPermissionsChannel); in createAutoGrantNotifierChannel() 190 mNotificationManager.cancel( in notifyOfAutoGrantPermissions() 193 mNotificationManager.notify(mPackageInfo.packageName, in notifyOfAutoGrantPermissions() 209 mNotificationManager.notify(ADMIN_AUTO_GRANTED_PERMISSIONS_NOTIFICATION_SUMMARY_ID, in notifyOfAutoGrantPermissions() 259 for (StatusBarNotification notification : mNotificationManager.getActiveNotifications()) { in isNotificationActive()
|