Merge "Flags instead of booleans for countPermissionApps"

This commit is contained in:
TreeHugger Robot
2019-02-01 18:21:33 +00:00
committed by Android (Google) Code Review
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) {

View File

@@ -71,7 +71,7 @@ public class TopLevelLocationPreferenceController extends BasePreferenceControll
return;
}
mContext.getSystemService(PermissionControllerManager.class).countPermissionApps(
Arrays.asList(ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION), false, false,
Arrays.asList(ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION), 0,
(numApps) -> {
setLocationAppCount(numApps);
}, null);