DO Disclosure: add UI that lists apps that were managed by owner:
- had permissions granted by admin - were installed by owner via policy Bug: 32692748 Test: m RunSettingsRoboTests Change-Id: I365e2f8f351671e68f83cceb7c0ca241d7a5a588
This commit is contained in:
@@ -22,6 +22,7 @@ import android.app.Fragment;
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public interface ApplicationFeatureProvider {
|
||||
@@ -48,6 +49,14 @@ public interface ApplicationFeatureProvider {
|
||||
*/
|
||||
void calculateNumberOfPolicyInstalledApps(boolean async, NumberOfAppsCallback callback);
|
||||
|
||||
/**
|
||||
* Asynchronously builds the list of apps installed on the device via policy in the current user
|
||||
* and all its managed profiles.
|
||||
*
|
||||
* @param callback The callback to invoke with the result
|
||||
*/
|
||||
void listPolicyInstalledApps(ListOfAppsCallback callback);
|
||||
|
||||
/**
|
||||
* Asynchronously calculates the total number of apps installed in the current user and all its
|
||||
* managed profiles that have been granted one or more of the given permissions by the admin.
|
||||
@@ -60,6 +69,16 @@ public interface ApplicationFeatureProvider {
|
||||
void calculateNumberOfAppsWithAdminGrantedPermissions(String[] permissions, boolean async,
|
||||
NumberOfAppsCallback callback);
|
||||
|
||||
/**
|
||||
* Asynchronously builds the list of apps installed in the current user and all its
|
||||
* managed profiles that have been granted one or more of the given permissions by the admin.
|
||||
*
|
||||
* @param permissions Only consider apps that have been granted one or more of these permissions
|
||||
* by the admin, either at run-time or install-time
|
||||
* @param callback The callback to invoke with the result
|
||||
*/
|
||||
void listAppsWithAdminGrantedPermissions(String[] permissions, ListOfAppsCallback callback);
|
||||
|
||||
/**
|
||||
* Return the persistent preferred activities configured by the admin for the current user and
|
||||
* all its managed profiles. A persistent preferred activity is an activity that the admin
|
||||
@@ -79,6 +98,13 @@ public interface ApplicationFeatureProvider {
|
||||
void onNumberOfAppsResult(int num);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback that receives the list of packages installed on the device.
|
||||
*/
|
||||
interface ListOfAppsCallback {
|
||||
void onListOfAppsResult(List<UserAppInfo> result);
|
||||
}
|
||||
|
||||
public static class PersistentPreferredActivityInfo {
|
||||
public final String packageName;
|
||||
public final int userId;
|
||||
|
Reference in New Issue
Block a user