Merge "Fix accessibility title in confirm device credential fragment."

This commit is contained in:
Doris Ling
2016-08-04 17:51:11 +00:00
committed by Android (Google) Code Review

View File

@@ -164,12 +164,16 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends OptionsMenuFra
if (intent != null) { if (intent != null) {
CharSequence titleText = intent.getCharSequenceExtra( CharSequence titleText = intent.getCharSequenceExtra(
ConfirmDeviceCredentialBaseFragment.TITLE_TEXT); ConfirmDeviceCredentialBaseFragment.TITLE_TEXT);
if (titleText == null || supplementalText == null) { if (supplementalText == null) {
return; return;
} }
String accessibilityTitle = if (titleText == null) {
new StringBuilder(titleText).append(",").append(supplementalText).toString(); getActivity().setTitle(supplementalText);
getActivity().setTitle(Utils.createAccessibleSequence(titleText, accessibilityTitle)); } else {
String accessibilityTitle =
new StringBuilder(titleText).append(",").append(supplementalText).toString();
getActivity().setTitle(Utils.createAccessibleSequence(titleText, accessibilityTitle));
}
} }
} }