Add method to disable "disable" button in installed app UI

OEMs can now force grey out the "disable" button for important apps on
device.

Change-Id: Ic075a07ad12592bd60238c7b1c9ab84932c8db3c
Fix: 38250742
Test: make RunSettingsRoboTests
This commit is contained in:
Fan Zhang
2017-05-31 10:42:19 -07:00
parent 63b013ea60
commit a45f3d2f33
6 changed files with 129 additions and 33 deletions

View File

@@ -129,6 +129,11 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
return preferredActivities;
}
@Override
public Set<String> getKeepEnabledPackages() {
return new ArraySet<>();
}
private static class CurrentUserAndManagedProfilePolicyInstalledAppCounter
extends InstalledAppCounter {
private NumberOfAppsCallback mCallback;