Home
last modified time | relevance | path

Searched refs:mMockAppOps (Results 1 – 4 of 4) sorted by relevance

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DSmsPermissionsTest.java50 private AppOpsManager mMockAppOps; field in SmsPermissionsTest
64 mMockPhone, mMockContext, mMockAppOps) { in setUp()
106 Mockito.when(mMockAppOps.noteOp( in testCheckCallingSendTextPermissions_persist_noAppOps()
121 Mockito.when(mMockAppOps.noteOp( in testCheckCallingSendTextPermissions_noPersist_grantViaCarrierApp()
163 Mockito.when(mMockAppOps.noteOp( in testCheckCallingSendTextPermissions_noPersist_noAppOps()
DTelephonyPermissionsTest.java65 private AppOpsManager mMockAppOps; field in TelephonyPermissionsTest
83 when(mMockContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mMockAppOps); in setUp()
95 when(mMockAppOps.noteOp(anyInt(), eq(UID), eq(PACKAGE))) in setUp()
97 when(mMockAppOps.noteOpNoThrow(anyString(), eq(UID), eq(PACKAGE))).thenReturn( in setUp()
130 when(mMockAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, UID, PACKAGE)) in testCheckReadPhoneState_hasPermissionAndAppOp()
170 when(mMockAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, UID, PACKAGE)) in testCheckReadPhoneStateOnAnyActiveSub_hasPermissionAndAppOp()
205 when(mMockAppOps.noteOp(AppOpsManager.OP_WRITE_SMS, UID, PACKAGE)) in testCheckReadPhoneNumber_defaultSmsApp()
223 when(mMockAppOps.noteOp(AppOpsManager.OP_READ_SMS, UID, PACKAGE)) in testCheckReadPhoneNumber_hasReadSms()
233 when(mMockAppOps.noteOp(AppOpsManager.OP_READ_PHONE_NUMBERS, UID, PACKAGE)) in testCheckReadPhoneNumber_hasReadPhoneNumbers()
271 when(mMockAppOps.noteOpNoThrow(AppOpsManager.OPSTR_READ_DEVICE_IDENTIFIERS, UID, in testCheckReadDeviceIdentifiers_hasAppOp()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DWifiPermissionsUtilTest.java76 @Mock private AppOpsManager mMockAppOps; field in WifiPermissionsUtilTest
729 verify(mMockAppOps).noteOp(eq(AppOpsManager.OP_FINE_LOCATION), anyInt(), anyString()); in testEnforceCoarseLocationPermissionLegacyApp()
750 verify(mMockAppOps).noteOp(eq(AppOpsManager.OP_FINE_LOCATION), anyInt(), anyString()); in testEnforceFineLocationPermissionNewQApp()
778 verify(mMockAppOps, never()).noteOp(anyInt(), anyInt(), anyString()); in testEnforceFailureFineLocationPermissionNewQApp()
832 when(mMockAppOps.noteOp( in testCheckSystemAlertWindowPermissionWithModeDefaultAppOps()
841 when(mMockAppOps.noteOp( in testCheckSystemAlertWindowPermissionWithModeDefaultAppOps()
860 when(mMockAppOps.noteOp( in testCheckSystemAlertWindowPermissionWithModeAllowedAppOps()
902 verify(mMockAppOps, never()).checkOp( in testCanAccessScanResultsForWifiScanner()
904 verify(mMockAppOps).noteOp(AppOpsManager.OP_FINE_LOCATION, mUid, TEST_PACKAGE_NAME); in testCanAccessScanResultsForWifiScanner()
931 verify(mMockAppOps).checkOp(AppOpsManager.OP_FINE_LOCATION, mUid, TEST_PACKAGE_NAME); in testCannotAccessScanResultsForWifiScanner_HideFromAppOps()
[all …]
/frameworks/base/tests/net/java/com/android/server/
DIpSecServiceParameterizedTest.java110 AppOpsManager mMockAppOps = mock(AppOpsManager.class); field in IpSecServiceParameterizedTest
117 return mMockAppOps;
174 when(mMockAppOps.noteOp(anyInt(), anyInt(), eq("blessedPackage"))) in setUp()
178 when(mMockAppOps.noteOp(anyInt(), anyInt(), eq("systemPackage"))) in setUp()
181 when(mMockAppOps.noteOp(anyInt(), anyInt(), eq("badPackage"))) in setUp()