summaryrefslogtreecommitdiffstats
path: root/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/PermissionsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/PermissionsTest.java')
-rw-r--r--hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/PermissionsTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/PermissionsTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/PermissionsTest.java
index fefe9cdb0c5..1c633c3eaff 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/PermissionsTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/PermissionsTest.java
@@ -343,8 +343,9 @@ public class PermissionsTest extends BaseDeviceAdminTest {
PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(
SIMPLE_PRE_M_APP_PACKAGE_NAME, 0);
assertEquals(PackageManager.PERMISSION_GRANTED,
- PermissionChecker.checkPermission(mContext, PERMISSION_NAME, -1,
- packageInfo.applicationInfo.uid, SIMPLE_PRE_M_APP_PACKAGE_NAME));
+ PermissionChecker.checkPermissionForDataDelivery(mContext, PERMISSION_NAME,
+ PermissionChecker.PID_UNKNOWN, packageInfo.applicationInfo.uid,
+ SIMPLE_PRE_M_APP_PACKAGE_NAME));
}
private void assertCanSetPermissionGrantStateAppPreM(int value) throws Exception {
@@ -365,7 +366,8 @@ public class PermissionsTest extends BaseDeviceAdminTest {
// For pre-M apps the access to the data might be prevented via app-ops. Hence check that
// they are correctly set
- boolean isGranted = (PermissionChecker.checkPermission(mContext, PERMISSION_NAME, -1,
+ boolean isGranted = (PermissionChecker.checkPermissionForDataDelivery(mContext,
+ PERMISSION_NAME, PermissionChecker.PID_UNKNOWN,
packageInfo.applicationInfo.uid, SIMPLE_PRE_M_APP_PACKAGE_NAME)
== PackageManager.PERMISSION_GRANTED);
switch (value) {