Merge "Revert "Revert "OP_GET_USAGE_STATS should be noted, not checked.""" into pi-dev
am: 687ddf6928
Change-Id: Ie9bcdc9736c04ab787efc193311a20d03718b593
This commit is contained in:
@@ -176,7 +176,7 @@ public class NetworkStatsAccessTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setHasAppOpsPermission(int appOpsMode, boolean hasPermission) {
|
private void setHasAppOpsPermission(int appOpsMode, boolean hasPermission) {
|
||||||
when(mAppOps.checkOp(AppOpsManager.OP_GET_USAGE_STATS, TEST_UID, TEST_PKG))
|
when(mAppOps.noteOp(AppOpsManager.OP_GET_USAGE_STATS, TEST_UID, TEST_PKG))
|
||||||
.thenReturn(appOpsMode);
|
.thenReturn(appOpsMode);
|
||||||
when(mContext.checkCallingPermission(Manifest.permission.PACKAGE_USAGE_STATS)).thenReturn(
|
when(mContext.checkCallingPermission(Manifest.permission.PACKAGE_USAGE_STATS)).thenReturn(
|
||||||
hasPermission ? PackageManager.PERMISSION_GRANTED
|
hasPermission ? PackageManager.PERMISSION_GRANTED
|
||||||
|
|||||||
Reference in New Issue
Block a user