Slice and dice app ops - Settings

Update the code to only pull and query the trsuted
portion of the last/historical app op data.

Test: manual

bug:111061782

Change-Id: I55b8be1c6715ff60c7b31c80db21029fea595c8f
This commit is contained in:
Svet Ganov
2019-02-18 16:29:15 -08:00
parent a4c1f0ada7
commit cfa412f2e2
3 changed files with 10 additions and 6 deletions

View File

@@ -77,13 +77,16 @@ public class RestrictAppPreferenceControllerTest {
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
final AppOpsManager.OpEntry allowOpEntry = new AppOpsManager.OpEntry(
AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, AppOpsManager.MODE_ALLOWED, 0, 0, 0, 0, "");
AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, false, AppOpsManager.MODE_ALLOWED,
null /*accessTimes*/, null /*rejectTimes*/, null /*durations*/,
null /* proxyUids */, null /* proxyPackages */);
final List<AppOpsManager.OpEntry> allowOps = new ArrayList<>();
allowOps.add(allowOpEntry);
final AppOpsManager.OpEntry restrictedOpEntry = new AppOpsManager.OpEntry(
AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, AppOpsManager.MODE_IGNORED, 0, 0, 0, 0, "");
AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, false, AppOpsManager.MODE_IGNORED,
null /*accessTimes*/, null /*rejectTimes*/, null /*durations*/,
null /* proxyUids */, null /* proxyPackages */);
final List<AppOpsManager.OpEntry> restrictedOps = new ArrayList<>();
restrictedOps.add(restrictedOpEntry);
mAllowedPackageOps = new AppOpsManager.PackageOps(