Merge "Flags instead of booleans for countPermissionApps"