diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java index d262514f1..222c70621 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java @@ -702,7 +702,7 @@ public class WifiPermissionsUtilTest extends WifiBaseTest { // verify that checking FINE for legacy apps! verify(mMockAppOps).noteOp(eq(AppOpsManager.OPSTR_FINE_LOCATION), anyInt(), anyString(), - any()); + any(), any()); } /** @@ -723,7 +723,7 @@ public class WifiPermissionsUtilTest extends WifiBaseTest { mMockContext, mMockUserManager, mWifiInjector); codeUnderTest.enforceLocationPermission(TEST_PACKAGE_NAME, mUid); verify(mMockAppOps) - .noteOp(eq(AppOpsManager.OPSTR_FINE_LOCATION), anyInt(), anyString(), any()); + .noteOp(eq(AppOpsManager.OPSTR_FINE_LOCATION), anyInt(), anyString(), any(), any()); } /** @@ -805,7 +805,7 @@ public class WifiPermissionsUtilTest extends WifiBaseTest { mMockContext, mMockUserManager, mWifiInjector); when(mMockAppOps.noteOp(AppOpsManager.OPSTR_SYSTEM_ALERT_WINDOW, MANAGED_PROFILE_UID, - TEST_PACKAGE_NAME, null)) + TEST_PACKAGE_NAME, null, null)) .thenReturn(AppOpsManager.MODE_DEFAULT); when(mMockPermissionsWrapper.getUidPermission( Manifest.permission.SYSTEM_ALERT_WINDOW, MANAGED_PROFILE_UID)) @@ -814,7 +814,7 @@ public class WifiPermissionsUtilTest extends WifiBaseTest { MANAGED_PROFILE_UID, TEST_PACKAGE_NAME)); when(mMockAppOps.noteOp(AppOpsManager.OPSTR_SYSTEM_ALERT_WINDOW, MANAGED_PROFILE_UID, - TEST_PACKAGE_NAME, null)) + TEST_PACKAGE_NAME, null, null)) .thenReturn(AppOpsManager.MODE_DEFAULT); when(mMockPermissionsWrapper.getUidPermission( Manifest.permission.SYSTEM_ALERT_WINDOW, MANAGED_PROFILE_UID)) @@ -966,7 +966,7 @@ public class WifiPermissionsUtilTest extends WifiBaseTest { verify(mMockAppOps, never()) .unsafeCheckOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME); verify(mMockAppOps) - .noteOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME, null); + .noteOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME, null, null); } /** @@ -996,7 +996,7 @@ public class WifiPermissionsUtilTest extends WifiBaseTest { verify(mMockAppOps).unsafeCheckOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME); verify(mMockAppOps, never()).noteOp( - AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME, null); + AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME, null, null); } @@ -1217,12 +1217,12 @@ public class WifiPermissionsUtilTest extends WifiBaseTest { when(mMockPkgMgr.getApplicationInfoAsUser(eq(TEST_PACKAGE_NAME), eq(0), anyInt())) .thenReturn(mMockApplInfo); when(mMockContext.getPackageManager()).thenReturn(mMockPkgMgr); - when(mMockAppOps.noteOp(AppOpsManager.OPSTR_WIFI_SCAN, mUid, TEST_PACKAGE_NAME, null)) - .thenReturn(mWifiScanAllowApps); - when(mMockAppOps.noteOp(AppOpsManager.OPSTR_COARSE_LOCATION, mUid, TEST_PACKAGE_NAME, null)) - .thenReturn(mAllowCoarseLocationApps); - when(mMockAppOps.noteOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME, null)) - .thenReturn(mAllowFineLocationApps); + when(mMockAppOps.noteOp(AppOpsManager.OPSTR_WIFI_SCAN, mUid, TEST_PACKAGE_NAME, null, null)) + .thenReturn(mWifiScanAllowApps); + when(mMockAppOps.noteOp(AppOpsManager.OPSTR_COARSE_LOCATION, mUid, TEST_PACKAGE_NAME, null, + null)).thenReturn(mAllowCoarseLocationApps); + when(mMockAppOps.noteOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME, null, + null)).thenReturn(mAllowFineLocationApps); when(mMockAppOps.unsafeCheckOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME)) .thenReturn(mAllowFineLocationApps); if (mThrowSecurityException) { |