Revert "Disabled apps should also be shown in restricted profiles app list"

This is breaking restricted profiles because the Google Keyboard suddenly
shows up in the list as disabled and InputMethodManagerService crashes
if the only available keyboard is not installed for the profile.

This reverts commit 90dcd7469b

Change-Id: Idd7c4f0f93a973b777889865e80c53caad759a63
This commit is contained in:
Amith Yamasani
2013-04-25 21:39:23 +00:00
committed by Android (Google) Code Review
parent 90dcd7469b
commit 39d0fd84ad

View File

@@ -350,8 +350,7 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
private void addSystemApps(List<SelectableAppInfo> visibleApps, Intent intent) { private void addSystemApps(List<SelectableAppInfo> visibleApps, Intent intent) {
if (getActivity() == null) return; if (getActivity() == null) return;
final PackageManager pm = getActivity().getPackageManager(); final PackageManager pm = getActivity().getPackageManager();
List<ResolveInfo> launchableApps = pm.queryIntentActivities(intent, List<ResolveInfo> launchableApps = pm.queryIntentActivities(intent, 0);
PackageManager.GET_DISABLED_COMPONENTS);
for (ResolveInfo app : launchableApps) { for (ResolveInfo app : launchableApps) {
if (app.activityInfo != null && app.activityInfo.applicationInfo != null) { if (app.activityInfo != null && app.activityInfo.applicationInfo != null) {
int flags = app.activityInfo.applicationInfo.flags; int flags = app.activityInfo.applicationInfo.flags;