Home
last modified time | relevance | path

Searched refs:mMockAppOpsManager (Results 1 – 8 of 8) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryOptimizeUtilsTest.java77 @Mock private AppOpsManager mMockAppOpsManager; field in BatteryOptimizeUtilsTest
94 mBatteryOptimizeUtils.mAppOpsManager = mMockAppOpsManager; in setUp()
106 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testGetAppOptimizationMode_returnRestricted()
115 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testGetAppOptimizationMode_returnUnrestricted()
124 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testGetAppOptimizationMode_returnOptimized()
160 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testSetAppUsageState_Restricted_verifyAction()
174 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testSetAppUsageState_Unrestricted_verifyAction()
188 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testSetAppUsageState_Optimized_verifyAction()
202 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testSetAppUsageState_sameUnrestrictedMode_verifyNoAction()
344 .when(mMockAppOpsManager) in runTestForResetWithMode()
[all …]
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/
DNearbyServiceTest.java64 private AppOpsManager mMockAppOpsManager; field in NearbyServiceTest
129 when(injector.getAppOpsManager()).thenReturn(mMockAppOpsManager); in setMockInjector()
130 when(mMockAppOpsManager.noteOp(eq(DiscoveryPermissions.OPSTR_BLUETOOTH_SCAN), in setMockInjector()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/specialaccess/
DAppOpsPreferenceControllerTest.java77 private AppOpsManager mMockAppOpsManager; field in AppOpsPreferenceControllerTest
100 mCarUxRestrictions, mMockAppOpsManager); in setUp()
183 verify(mMockAppOpsManager).setMode(APP_OP_CODE, uid, packageName, in onPreferenceChange_checkedState_setsAppOpModeAllowed()
200 verify(mMockAppOpsManager).setMode(APP_OP_CODE, uid, packageName, in onPreferenceChange_uncheckedState_setsNegativeAppOpMode()
DAppStateAppOpsBridgeTest.java79 private AppOpsManager mMockAppOpsManager; field in AppStateAppOpsBridgeTest
95 Collections.singletonList(userHandle), mMockAppOpsManager); in setUp()
283 Arrays.asList(userHandle1, userHandle2), mMockAppOpsManager); in loadsAppOpExtraInfo_multipleProfiles()
339 when(mMockAppOpsManager.getPackagesForOps((int[]) any())).thenReturn(packageOpsList); in mockPackageOps()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserNoticeServiceTest.java88 private AppOpsManager mMockAppOpsManager; field in CarUserNoticeServiceTest
144 mockContextGetService(mMockContext, AppOpsManager.class, mMockAppOpsManager); in setUpMocks()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareMetricsTest.java71 @Mock private AppOpsManager mMockAppOpsManager; field in WifiAwareMetricsTest
117 when(mMockContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mMockAppOpsManager); in setUp()
DWifiAwareStateManagerTest.java170 @Mock private AppOpsManager mMockAppOpsManager; field in WifiAwareStateManagerTest
235 when(mMockContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mMockAppOpsManager); in setUp()
241 when(mMockAppOpsManager.noteOp(eq(AppOpsManager.OP_FINE_LOCATION), anyInt(), in setUp()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DInCallControllerTests.java147 @Mock AppOpsManager mMockAppOpsManager; field in InCallControllerTests
220 doReturn(mMockAppOpsManager).when(mMockContext).getSystemService(AppOpsManager.class); in setUp()