Add number of enterprise-installed apps to Privacy Settings page

This CL adds information about the number of apps that were installed
by the admin to the Enterprise Privacy Settings page.

Test: make RunSettingsRoboTests
Bug: 32692748

Change-Id: Ib710a1249db6d285da962122fd3dfb35a43752a1
This commit is contained in:
Bartosz Fabianowski
2017-01-13 17:41:38 +01:00
parent 0d22680807
commit 13f569ebd6
16 changed files with 314 additions and 40 deletions

View File

@@ -26,11 +26,21 @@ public interface ApplicationFeatureProvider {
*/
AppHeaderController newAppHeaderController(Fragment fragment, View appHeader);
/**
* Count all installed packages, irrespective of install reason.
*/
public static final int IGNORE_INSTALL_REASON = -1;
/**
* Asynchronously calculates the total number of apps installed on the device, across all users
* and managed profiles.
*
* @param installReason Only consider packages with this install reason; may be any install
* reason defined in {@link android.content.pm.PackageManager} or
* {@link #IGNORE_INSTALL_REASON} to count all packages, irrespective of install reason.
* @param callback The callback to invoke with the result
*/
void calculateNumberOfInstalledApps(NumberOfInstalledAppsCallback callback);
void calculateNumberOfInstalledApps(int installReason, NumberOfInstalledAppsCallback callback);
/**
* Callback that receives the total number of packages installed on the device.