Don't label non-system default handling app with sub text if there is only one profile.

Bug: 148907948
Test: Flash device and check the sub text
Change-Id: I7aa17413bb28adf552ca3551c0a04d34ae69207f
This commit is contained in:
Paul Chang
2020-02-05 15:42:52 +08:00
parent 9e5c6130cd
commit ca914a36a7

View File

@@ -176,6 +176,9 @@ public class BugReportHandlerPicker extends DefaultAppPickerFragment {
if (BugReportHandlerUtil.SHELL_APP_PACKAGE.equals(handlerApp)) {
return context.getString(R.string.system_default_app_subtext);
}
if (mUserManager.getUserProfiles().size() < 2) {
return "";
}
final UserInfo userInfo = mUserManager.getUserInfo(handlerUser);
if (userInfo != null && userInfo.isManagedProfile()) {
return context.getString(R.string.work_profile_app_subtext);