Flags instead of booleans for countPermissionApps

Test: Checked that the api retunred the results
Bug: 123697839
Change-Id: Iadb1c4307933635e6114d3d32a2a2b1ed87949f4
This commit is contained in:
Philip P. Moltmann
2019-01-31 14:22:24 -08:00
parent 8e268830f2
commit a9fb152309
2 changed files with 4 additions and 3 deletions

View File

@@ -76,7 +76,7 @@ public class AppLocationPermissionPreferenceController extends
PermissionControllerManager permController =
mContext.getSystemService(PermissionControllerManager.class);
permController.countPermissionApps(
Arrays.asList(ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION), false, false,
Arrays.asList(ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION), 0,
(numApps) -> {
mNumTotal = numApps;
if (loadingInProgress.decrementAndGet() == 0) {
@@ -85,7 +85,8 @@ public class AppLocationPermissionPreferenceController extends
}, null);
permController.countPermissionApps(
Collections.singletonList(ACCESS_BACKGROUND_LOCATION), true, false,
Collections.singletonList(ACCESS_BACKGROUND_LOCATION),
PermissionControllerManager.COUNT_ONLY_WHEN_GRANTED,
(numApps) -> {
mNumBackground = numApps;
if (loadingInProgress.decrementAndGet() == 0) {