Revert "OP_GET_USAGE_STATS should be noted, not checked."

This reverts commit b1296e58da.

Reason for revert: ijpedowitz@

Bug: 77662908
Change-Id: I5dd0ad5038df90ea8a80ba6f583ee46fb24600c2
Exempt-From-Owner-Approval: keep tests passing
This commit is contained in:
Jeff Sharkey
2018-04-16 16:39:55 +00:00
parent b1296e58da
commit d5992e681f

View File

@@ -176,7 +176,7 @@ public class NetworkStatsAccessTest {
}
private void setHasAppOpsPermission(int appOpsMode, boolean hasPermission) {
when(mAppOps.noteOp(AppOpsManager.OP_GET_USAGE_STATS, TEST_UID, TEST_PKG))
when(mAppOps.checkOp(AppOpsManager.OP_GET_USAGE_STATS, TEST_UID, TEST_PKG))
.thenReturn(appOpsMode);
when(mContext.checkCallingPermission(Manifest.permission.PACKAGE_USAGE_STATS)).thenReturn(
hasPermission ? PackageManager.PERMISSION_GRANTED