/packages/apps/Settings/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ |
D | TypeFilterPreferenceControllerTest.java | 63 NotificationBackend mNm; field in TypeFilterPreferenceControllerTest 86 mController.setNm(mNm); in setUp() 94 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(false); in testAvailable_notGranted() 102 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_noCustomizations() 104 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_lowTargetSdk_noCustomizations() 111 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_customizations() 115 when(mNm.getListenerFilter(mCn, 0)).thenReturn(nlf); in testAvailable_lowTargetSdk_customizations() 122 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_highTargetSdk_noCustomizations() 124 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_highTargetSdk_noCustomizations() 131 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in updateState_enabled_noMetaData() [all …]
|
D | BridgedAppsPreferenceControllerTest.java | 63 NotificationBackend mNm; field in BridgedAppsPreferenceControllerTest 100 mController.setNm(mNm); in setUp() 108 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_AddsToScreen() 109 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_AddsToScreen() 122 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_doesNotReaddToScreen() 123 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_doesNotReaddToScreen() 140 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_removesExtras() 141 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_removesExtras() 158 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_buildsSetting() 159 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_buildsSetting() [all …]
|
D | PreUpgradePreferenceControllerTest.java | 51 NotificationBackend mNm; field in PreUpgradePreferenceControllerTest 61 mController.setNm(mNm); in setUp() 67 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(false); in testAvailable_notGranted() 75 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_noCustomizations() 77 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_lowTargetSdk_noCustomizations() 84 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_customizations() 88 when(mNm.getListenerFilter(mCn, 0)).thenReturn(nlf); in testAvailable_lowTargetSdk_customizations() 95 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_highTargetSdk_noCustomizations() 97 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_highTargetSdk_noCustomizations()
|
D | BridgedAppsLinkPreferenceControllerTest.java | 51 NotificationBackend mNm; field in BridgedAppsLinkPreferenceControllerTest 61 mController.setNm(mNm); in setUp() 67 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(false); in testAvailable_notGranted() 75 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_noCustomizations() 77 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_lowTargetSdk_noCustomizations() 84 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_customizations() 88 when(mNm.getListenerFilter(mCn, 0)).thenReturn(nlf); in testAvailable_lowTargetSdk_customizations() 95 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_highTargetSdk_noCustomizations() 97 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_highTargetSdk_noCustomizations()
|
D | ApprovalPreferenceControllerTest.java | 56 NotificationManager mNm; field in ApprovalPreferenceControllerTest 75 mController.setNm(mNm); in setUp() 82 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in updateState_checked() 97 verify(mNm).setNotificationListenerAccessGranted(mCn, true); in enable() 108 verify(mNm).setNotificationListenerAccessGranted(mCn, false); in disable()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenOnboardingActivityTest.java | 63 private NotificationManager mNm; field in ZenOnboardingActivityTest 74 shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNm); in setUp() 79 mActivity.setNotificationManager(mNm); in setUp() 98 when(mNm.getNotificationPolicy()).thenReturn(policy); in saveNewSetting() 106 verify(mNm).setNotificationPolicy(captor.capture()); in saveNewSetting() 120 when(mNm.getNotificationPolicy()).thenReturn(policy); in keepCurrentSetting() 126 verify(mNm, never()).setNotificationPolicy(any()); in keepCurrentSetting() 132 when(mNm.getNotificationPolicy()).thenReturn(policy); in isSuggestionComplete_zenUpdated() 143 when(mNm.getNotificationPolicy()).thenReturn(policy); in isSuggestionComplete_withinTimeThreshold() 154 when(mNm.getNotificationPolicy()).thenReturn(policy); in isSuggestionComplete_showSettingsSuggestionTrue() [all …]
|
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/ |
D | NetworkStackNotifierTest.kt | 83 private lateinit var mNm: NotificationManager variable in com.android.networkstack.NetworkStackNotifierTest 164 mAllUserContext.mockService(Context.NOTIFICATION_SERVICE, NotificationManager::class, mNm) in setUp() 199 verify(mNm, never()).notify(any(), anyInt(), any()) in testNoNotification() 203 verify(mNm).notify(eq(TEST_NETWORK_TAG), mNoteIdCaptor.capture(), mNoteCaptor.capture()) in verifyConnectedNotification() 216 verify(mNm).cancel(TEST_NETWORK_TAG, mNoteIdCaptor.value) in verifyCanceledNotificationAfterNetworkLost() 222 verify(mNm).cancel(TEST_NETWORK_TAG, mNoteIdCaptor.value) in verifyCanceledNotificationAfterDefaultNetworkLost() 232 verify(mNm, never()).notify(any(), anyInt(), any()) in testConnectedNotification_NoSsid() 299 verify(mNm).notify(eq(TEST_NETWORK_TAG), mNoteIdCaptor.capture(), mNoteCaptor.capture()) in testVenueInfoNotification() 311 doReturn(null).`when`(mNm).getNotificationChannel(CHANNEL_VENUE_INFO) in testVenueInfoNotification_VenueInfoDisabled() 317 verify(mNm, never()).notify(any(), anyInt(), any()) in testVenueInfoNotification_VenueInfoDisabled() [all …]
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/notificationaccess/ |
D | ApprovalPreferenceController.java | 42 private NotificationManager mNm; field in ApprovalPreferenceController 65 mNm = nm; in setNm() 110 mNm.setNotificationListenerAccessGranted(cn, false); in disable() 112 if (!mNm.isNotificationPolicyAccessGrantedForPackage( in disable() 114 mNm.removeAutomaticZenRules(cn.getPackageName()); in disable() 121 mNm.setNotificationListenerAccessGranted(cn, true); in enable() 125 return mNm.isNotificationListenerAccessGranted(cn); in isServiceEnabled()
|
D | TypeFilterPreferenceController.java | 47 private NotificationBackend mNm; field in TypeFilterPreferenceController 67 mNm = nm; in setNm() 85 if (mNm.isNotificationListenerAccessGranted(mCn)) { in getAvailabilityStatus() 90 mNlf = mNm.getListenerFilter(mCn, mUserId); in getAvailabilityStatus() 105 mNlf = mNm.getListenerFilter(mCn, mUserId); in onPreferenceChange() 116 mNm.setListenerFilter(mCn, mUserId, mNlf); in onPreferenceChange() 122 mNlf = mNm.getListenerFilter(mCn, mUserId); in updateState()
|
D | BridgedAppsLinkPreferenceController.java | 29 private NotificationBackend mNm; field in BridgedAppsLinkPreferenceController 49 mNm = nm; in setNm() 60 if (mNm.isNotificationListenerAccessGranted(mCn)) { in getAvailabilityStatus() 65 mNlf = mNm.getListenerFilter(mCn, mUserId); in getAvailabilityStatus()
|
D | PreUpgradePreferenceController.java | 31 private NotificationBackend mNm; field in PreUpgradePreferenceController 50 mNm = nm; in setNm() 61 if (mNm.isNotificationListenerAccessGranted(mCn)) { in getAvailabilityStatus() 62 mNlf = mNm.getListenerFilter(mCn, mUserId); in getAvailabilityStatus()
|
D | BridgedAppsPreferenceController.java | 50 private NotificationBackend mNm; field in BridgedAppsPreferenceController 73 mNm = nm; in setNm() 118 mNlf = mNm.getListenerFilter(mCn, mUserId); in onRebuildComplete() 175 mNlf = mNm.getListenerFilter(mCn, mUserId); in onPreferenceChange() 181 mNm.setListenerFilter(mCn, mUserId, mNlf); in onPreferenceChange()
|
/packages/modules/NetworkStack/src/com/android/server/ |
D | NetworkStackService.java | 563 private final NetworkMonitor mNm; field in NetworkStackService.NetworkMonitorConnector 569 mNm = nm; in NetworkMonitorConnector() 576 mNm.start(); in start() 582 mNm.launchCaptivePortalApp(); in launchCaptivePortalApp() 588 mNm.notifyCaptivePortalAppFinished(response); in notifyCaptivePortalAppFinished() 594 mNm.setAcceptPartialConnectivity(); in setAcceptPartialConnectivity() 600 mNm.forceReevaluation(uid); in forceReevaluation() 606 mNm.notifyPrivateDnsSettingsChanged(PrivateDnsConfig.fromParcel(config)); in notifyPrivateDnsChanged() 612 mNm.notifyDnsResponse(returnCode); in notifyDnsResponse() 618 mNm.notifyNetworkConnected(lp, nc); in notifyNetworkConnected() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/specialaccess/ |
D | NotificationAccessPreferenceController.java | 65 private final NotificationManager mNm; field in NotificationAccessPreferenceController 84 mNm = context.getSystemService(NotificationManager.class); in NotificationAccessPreferenceController() 174 return mNm.isNotificationListenerAccessGranted(service); in isAccessGranted() 178 mNm.setNotificationListenerAccessGranted(service, /* granted= */ true); in grantNotificationAccess() 182 mNm.setNotificationListenerAccessGranted(service, /* granted= */ false); in revokeNotificationAccess() 184 if (!mNm.isNotificationPolicyAccessGrantedForPackage(service.getPackageName())) { in revokeNotificationAccess() 185 mNm.removeAutomaticZenRules(service.getPackageName()); in revokeNotificationAccess()
|
/packages/services/Telephony/sip/src/com/android/services/telephony/sip/ |
D | SipAccountRegistry.java | 86 private NotificationManager mNm; field in SipAccountRegistry 108 mNm = context.getSystemService(NotificationManager.class); in setupNotificationChannel() 109 if (mNm != null) { in setupNotificationChannel() 110 mNm.createNotificationChannel(mNotificationChannel); in setupNotificationChannel() 255 if (mNm != null) { in sendSipAccountsRemovedNotification() 256 mNm.notify(NOTIFICATION_TAG, SIP_ACCOUNTS_REMOVED_NOTIFICATION_ID, in sendSipAccountsRemovedNotification()
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | BluetoothPairingService.java | 62 NotificationManager mNm; field in BluetoothPairingService 109 mNm.cancel(NOTIFICATION_ID); 116 mNm = getSystemService(NotificationManager.class); in onCreate() 121 mNm.createNotificationChannel(notificationChannel); in onCreate() 138 mNm.cancel(NOTIFICATION_ID); in onStartCommand() 148 mNm.cancel(NOTIFICATION_ID); in onStartCommand() 221 mNm.notify(NOTIFICATION_ID, builder.build()); in createPairingNotification()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothPairingServiceTest.java | 54 private NotificationManager mNm; field in BluetoothPairingServiceTest 74 mBluetoothPairingService.mNm = mNm; in setUp() 96 verify(mNm).notify(eq(mBluetoothPairingService.NOTIFICATION_ID), any()); in receivePairingRequestAction_notificationShown() 110 verify(mNm).cancel(mBluetoothPairingService.NOTIFICATION_ID); in receiveDismissPairingAction_cancelPairing()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | DndPreferenceControllerTest.java | 68 private NotificationManager mNm; field in DndPreferenceControllerTest 80 shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNm); in setUp() 88 when(mNm.getNotificationPolicy()).thenReturn(new NotificationManager.Policy(0, 0, 0, 0)); in testIsAvailable_app() 96 when(mNm.getNotificationPolicy()).thenReturn(new NotificationManager.Policy(0, 0, 0, 1)); in testIsAvailable_channel() 106 when(mNm.getNotificationPolicy()).thenReturn(new NotificationManager.Policy(0, 0, 0, 1)); in testIsAvailable_filteredIn() 117 when(mNm.getNotificationPolicy()).thenReturn(new NotificationManager.Policy(0, 0, 0, 1)); in testIsAvailable_filteredOut()
|
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/notification/ |
D | ChannelNotificationSettingsTest.java | 58 private NotificationManager mNm; field in ChannelNotificationSettingsTest 69 mNm = (NotificationManager) mTargetContext.getSystemService(Context.NOTIFICATION_SERVICE); in setUp() 72 mNm.createNotificationChannel(mNotificationChannel); in setUp() 91 mNm.createNotificationChannel(blocked); in launchNotificationSettings_blockedChannel()
|
/packages/apps/Calendar/src/com/android/calendar/alerts/ |
D | AlertService.java | 144 NotificationManager mNm; field in AlertService.NotificationMgrWrapper 147 mNm = nm; in NotificationMgrWrapper() 152 mNm.cancel(id); in cancel() 157 mNm.notify(id, nw.mNotification); in notify()
|
/packages/apps/Settings/src/com/android/settings/utils/ |
D | ZenServiceListing.java | 41 private final NotificationManager mNm; field in ZenServiceListing 46 mNm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); in ZenServiceListing() 73 List<String> enabledNotificationListenerPkgs = mNm.getEnabledNotificationListenerPackages(); in reloadApprovedServices() 79 if (mNm.isNotificationPolicyAccessGrantedForPackage(pkg) in reloadApprovedServices()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/incident/ |
D | PendingList.java | 104 private final NotificationManager mNm; field in PendingList.Updater 114 mNm = context.getSystemService(NotificationManager.class); in Updater() 207 mNm.cancel(remainingNotifications.valueAt(i), Constants.INCIDENT_NOTIFICATION_ID); in updateState() 276 mNm.notify(rec.report.getUri().toString(), Constants.INCIDENT_NOTIFICATION_ID, in showNotifications() 293 mNm.createNotificationChannel(channel); in createNotificationChannel()
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenOnboardingActivity.java | 55 private NotificationManager mNm; field in ZenOnboardingActivity 108 mNm = nm; in setNotificationManager() 124 NotificationManager.Policy policy = mNm.getNotificationPolicy(); in save() 132 mNm.setNotificationPolicy(newPolicy); in save()
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | NotificationAccessConfirmationActivity.java | 54 private NotificationManager mNm; field in NotificationAccessConfirmationActivity 62 mNm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); in onCreate() 115 mNm.setNotificationListenerAccessGranted(mComponentName, true); in onAllow()
|
/packages/apps/Settings/src/com/android/settings/applications/manageapplications/ |
D | ResetAppsHelper.java | 50 private final INotificationManager mNm; field in ResetAppsHelper 61 mNm = INotificationManager.Stub.asInterface( in ResetAppsHelper() 125 mNm.clearData(app.packageName, app.uid, false); in onClick()
|