Merge "Launchers that don't support managed profiles cannot be selected" into oc-dev
am: 535533680f
Change-Id: I9058ae475e16c3b3c3227aa979af78c8958d0628
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user