Home
last modified time | relevance | path

Searched refs:mNm (Results 1 – 25 of 57) sorted by relevance

123

/packages/apps/Settings/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/
DTypeFilterPreferenceControllerTest.java63 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 …]
DBridgedAppsPreferenceControllerTest.java62 NotificationBackend mNm; field in BridgedAppsPreferenceControllerTest
98 mController.setNm(mNm); in setUp()
106 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_AddsToScreen()
107 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_AddsToScreen()
120 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_doesNotReaddToScreen()
121 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_doesNotReaddToScreen()
138 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_removesExtras()
139 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_removesExtras()
156 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in onRebuildComplete_buildsSetting()
157 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in onRebuildComplete_buildsSetting()
[all …]
DPreUpgradePreferenceControllerTest.java51 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()
DBridgedAppsLinkPreferenceControllerTest.java52 NotificationBackend mNm; field in BridgedAppsLinkPreferenceControllerTest
62 mController.setNm(mNm); in setUp()
68 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(false); in testAvailable_notGranted()
81 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_noCustomizations()
83 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_lowTargetSdk_noCustomizations()
95 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_lowTargetSdk_customizations()
99 when(mNm.getListenerFilter(mCn, 0)).thenReturn(nlf); in testAvailable_lowTargetSdk_customizations()
111 when(mNm.isNotificationListenerAccessGranted(any())).thenReturn(true); in testAvailable_highTargetSdk_noCustomizations()
113 when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter()); in testAvailable_highTargetSdk_noCustomizations()
DApprovalPreferenceControllerTest.java59 NotificationManager mNm; field in ApprovalPreferenceControllerTest
80 mController.setNm(mNm); in setUp()
90 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in updateState_checked()
104 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(false); in restrictedSettings_appOpsDisabled()
117 when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true); in restrictedSettings_serviceAlreadyEnabled()
134 verify(mNm).setNotificationListenerAccessGranted(mCn, true); in enable()
145 verify(mNm).setNotificationListenerAccessGranted(mCn, false); in disable()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/
DZenOnboardingActivityTest.java63 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/
DNetworkStackNotifierTest.kt85 private lateinit var mNm: NotificationManager variable in com.android.networkstack.NetworkStackNotifierTest
166 mAllUserContext.mockService(Context.NOTIFICATION_SERVICE, NotificationManager::class, mNm) in setUp()
201 verify(mNm, never()).notify(any(), anyInt(), any()) in testNoNotification()
205 verify(mNm).notify(eq(TEST_NETWORK_TAG), mNoteIdCaptor.capture(), mNoteCaptor.capture()) in verifyConnectedNotification()
218 verify(mNm).cancel(TEST_NETWORK_TAG, mNoteIdCaptor.value) in verifyCanceledNotificationAfterNetworkLost()
224 verify(mNm).cancel(TEST_NETWORK_TAG, mNoteIdCaptor.value) in verifyCanceledNotificationAfterDefaultNetworkLost()
234 verify(mNm, never()).notify(any(), anyInt(), any()) in testConnectedNotification_NoSsid()
301 verify(mNm).notify(eq(TEST_NETWORK_TAG), mNoteIdCaptor.capture(), mNoteCaptor.capture()) in testVenueInfoNotification()
313 doReturn(null).`when`(mNm).getNotificationChannel(CHANNEL_VENUE_INFO) in testVenueInfoNotification_VenueInfoDisabled()
319 verify(mNm, never()).notify(any(), anyInt(), any()) in testVenueInfoNotification_VenueInfoDisabled()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/notificationaccess/
DApprovalPreferenceController.java42 private NotificationManager mNm; field in ApprovalPreferenceController
65 mNm = nm; in setNm()
113 mNm.setNotificationListenerAccessGranted(cn, false); in disable()
115 if (!mNm.isNotificationPolicyAccessGrantedForPackage( in disable()
117 mNm.removeAutomaticZenRules(cn.getPackageName()); in disable()
124 mNm.setNotificationListenerAccessGranted(cn, true); in enable()
128 return mNm.isNotificationListenerAccessGranted(cn); in isServiceEnabled()
DTypeFilterPreferenceController.java47 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()
DPreUpgradePreferenceController.java31 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()
DBridgedAppsLinkPreferenceController.java30 private NotificationBackend mNm; field in BridgedAppsLinkPreferenceController
50 mNm = nm; in setNm()
61 if (mNm.isNotificationListenerAccessGranted(mCn)) { in getAvailabilityStatus()
65 mNlf = mNm.getListenerFilter(mCn, mUserId); in getAvailabilityStatus()
DBridgedAppsPreferenceController.java51 private NotificationBackend mNm; field in BridgedAppsPreferenceController
74 mNm = nm; in setNm()
119 mNlf = mNm.getListenerFilter(mCn, mUserId); in onRebuildComplete()
176 mNlf = mNm.getListenerFilter(mCn, mUserId); in onPreferenceChange()
182 mNm.setListenerFilter(mCn, mUserId, mNlf); in onPreferenceChange()
/packages/modules/NetworkStack/src/com/android/server/
DNetworkStackService.java564 private final NetworkMonitor mNm; field in NetworkStackService.NetworkMonitorConnector
570 mNm = nm; in NetworkMonitorConnector()
577 mNm.start(); in start()
583 mNm.launchCaptivePortalApp(); in launchCaptivePortalApp()
589 mNm.notifyCaptivePortalAppFinished(response); in notifyCaptivePortalAppFinished()
595 mNm.setAcceptPartialConnectivity(); in setAcceptPartialConnectivity()
601 mNm.forceReevaluation(uid); in forceReevaluation()
607 mNm.notifyPrivateDnsSettingsChanged(PrivateDnsConfig.fromParcel(config)); in notifyPrivateDnsChanged()
613 mNm.notifyDnsResponse(returnCode); in notifyDnsResponse()
623 mNm.notifyNetworkConnected(lp, nc); in notifyNetworkConnected()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/applications/specialaccess/
DNotificationAccessPreferenceController.java65 private final NotificationManager mNm; field in NotificationAccessPreferenceController
94 mNm = notificationManager; in NotificationAccessPreferenceController()
185 return mNm.isNotificationListenerAccessGranted(service); in isAccessGranted()
189 mNm.setNotificationListenerAccessGranted(service, /* granted= */ true); in grantNotificationAccess()
193 mNm.setNotificationListenerAccessGranted(service, /* granted= */ false); in revokeNotificationAccess()
197 if (!mNm.isNotificationPolicyAccessGrantedForPackage(service.getPackageName())) { in revokeNotificationAccess()
198 mNm.removeAutomaticZenRules(service.getPackageName()); in revokeNotificationAccess()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothPairingServiceTest.java54 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/src/com/android/settings/bluetooth/
DBluetoothPairingService.java62 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()
222 mNm.notify(NOTIFICATION_ID, builder.build()); in createPairingNotification()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/
DDndPreferenceControllerTest.java68 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/Calendar/src/com/android/calendar/alerts/
DAlertService.kt74 var mNm: NotificationManager variable in com.android.calendar.alerts.AlertService
77 mNm.cancel(id) in cancel()
82 mNm.notify(id, nw?.mNotification) in notify()
86 mNm = nm
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/notification/
DChannelNotificationSettingsTest.java58 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/Settings/src/com/android/settings/utils/
DZenServiceListing.java41 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/
DPendingList.java104 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()
277 mNm.notify(rec.report.getUri().toString(), Constants.INCIDENT_NOTIFICATION_ID, in showNotifications()
294 mNm.createNotificationChannel(channel); in createNotificationChannel()
/packages/apps/Settings/src/com/android/settings/notification/zen/
DZenOnboardingActivity.java55 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()
DZenRuleSelectionDialog.java63 private static NotificationManager mNm; field in ZenRuleSelectionDialog
84 mNm = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); in show()
218 && mNm.isNotificationPolicyAccessGrantedForPackage(ri.packageName)
220 >= (mNm.getRuleInstanceCount(ci.getComponentName()) + 1))) {
/packages/apps/Settings/src/com/android/settings/notification/
DNotificationAccessConfirmationActivity.java56 private NotificationManager mNm; field in NotificationAccessConfirmationActivity
64 mNm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); in onCreate()
140 mNm.setNotificationListenerAccessGranted(mComponentName, true); in onAllow()
/packages/apps/Settings/src/com/android/settings/applications/manageapplications/
DResetAppsHelper.java54 private final INotificationManager mNm; field in ResetAppsHelper
66 mNm = INotificationManager.Stub.asInterface( in ResetAppsHelper()
132 mNm.clearData(app.packageName, app.uid, false); in onClick()

123