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

@@ -15,7 +15,6 @@
package com.android.settings.testutils;
import android.content.pm.ApplicationInfo;
import android.os.UserHandle;
/**
* Helper for mocking installed applications.
@@ -25,19 +24,21 @@ public class ApplicationTestUtils {
* Create and populate an {@link android.content.pm.ApplicationInfo} object that describes an
* installed app.
*
* @param userId The user id that this app is installed for. Typical values are 0 for the
* system user and 10, 11, 12... for secondary users.
* @param uid The app's uid
* @param packageName The app's package name.
* @param flags Flags describing the app. See {@link android.content.pm.ApplicationInfo#flags}
* for possible values.
* @param targetSdkVersion The app's target SDK version
*
* @see android.content.pm.ApplicationInfo
*/
public static ApplicationInfo buildInfo(int userId, String packageName, int flags) {
public static ApplicationInfo buildInfo(int uid, String packageName, int flags,
int targetSdkVersion) {
final ApplicationInfo info = new ApplicationInfo();
info.uid = UserHandle.getUid(userId, 1);
info.uid = uid;
info.packageName = packageName;
info.flags = flags;
info.targetSdkVersion = targetSdkVersion;
return info;
}
}