Merge "Launchers that don't support managed profiles cannot be selected" into oc-dev am: 535533680f

am: 112f8d88fd

Change-Id: I23d0ee4977fc544b35723512977670cd2686c7d1
This commit is contained in:
Esteban Talavera
2017-05-31 12:09:31 +00:00
committed by android-build-merger
2 changed files with 86 additions and 7 deletions

View File

@@ -63,13 +63,15 @@ public class DefaultHomePicker extends DefaultAppPickerFragment {
}
final String summary;
boolean enabled = true;
if (mustSupportManagedProfile && !launcherHasManagedProfilesFeature(resolveInfo)) {
summary = getContext().getString(R.string.home_work_profile_not_supported);
enabled = false;
} else {
summary = null;
}
final DefaultAppInfo candidate =
new DefaultAppInfo(mPm, mUserId, activityName, summary);
new DefaultAppInfo(mPm, mUserId, activityName, summary, enabled);
candidates.add(candidate);
}
return candidates;