Merge "Update subtext UI on Bug report handler settings"

This commit is contained in:
Paul Chang
2019-12-18 03:11:08 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 7 deletions

View File

@@ -11386,11 +11386,14 @@
<!-- Developer Settings: Footer text for bug report handler picker [CHAR LIMIT=NONE] -->
<string name="bug_report_handler_picker_footer_text">Determines which app handles the Bug Report shortcut on your device.</string>
<!-- Label of personal profile app for current setting [CHAR LIMIT=NONE] -->
<string name="personal_profile_app">(Personal)</string>
<!-- Subtext of personal profile app for current setting [CHAR LIMIT=NONE] -->
<string name="personal_profile_app_subtext">Personal</string>
<!-- Label of work profile app for current setting [CHAR LIMIT=NONE] -->
<string name="work_profile_app">(Work)</string>
<!-- Subtext of work profile app for current setting [CHAR LIMIT=NONE] -->
<string name="work_profile_app_subtext">Work</string>
<!-- Subtext of system default app for current setting [CHAR LIMIT=NONE] -->
<string name="system_default_app_subtext">System default</string>
<!-- Title of Shell app for current setting [CHAR LIMIT=NONE] -->
<string name="shell_app">Android System (Shell)</string>

View File

@@ -164,13 +164,13 @@ public class BugReportHandlerPicker extends DefaultAppPickerFragment {
private String getDescription(String handlerApp, int handlerUser) {
final Context context = getContext();
if (BugReportHandlerUtil.SHELL_APP_PACKAGE.equals(handlerApp)) {
return context.getString(R.string.system_default_app);
return context.getString(R.string.system_default_app_subtext);
}
final UserHandle managedProfile = Utils.getManagedProfile(mUserManager);
if (managedProfile != null && managedProfile.getIdentifier() == handlerUser) {
return context.getString(R.string.work_profile_app);
return context.getString(R.string.work_profile_app_subtext);
}
return context.getString(R.string.personal_profile_app);
return context.getString(R.string.personal_profile_app_subtext);
}
private static class BugreportHandlerAppInfo extends DefaultAppInfo {