Add admin-granted permissions to Enterprise Privacy Settings page

This CL adds information about the number of apps that have been granted
particularly sensitive permissions (location, microphone, camera) by
the admin.

Bug: 32692748
Test: make RunSettingsRoboTests

Change-Id: I650d3e1ed3950960c58722b0c035a76daeb36478
This commit is contained in:
Bartosz Fabianowski
2017-01-16 15:48:56 +01:00
parent 859bc9190d
commit 9704a28c7b
27 changed files with 1026 additions and 83 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.overlay;
import android.app.AppGlobals;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.net.ConnectivityManager;
@@ -85,7 +86,10 @@ public class FeatureFactoryImpl extends FeatureFactory {
public ApplicationFeatureProvider getApplicationFeatureProvider(Context context) {
if (mApplicationFeatureProvider == null) {
mApplicationFeatureProvider = new ApplicationFeatureProviderImpl(context,
new PackageManagerWrapperImpl(context.getPackageManager()));
new PackageManagerWrapperImpl(context.getPackageManager()),
AppGlobals.getPackageManager(),
new DevicePolicyManagerWrapperImpl((DevicePolicyManager) context
.getSystemService(Context.DEVICE_POLICY_SERVICE)));
}
return mApplicationFeatureProvider;
}