Fix talkback label "ACCOUNTS FOR OWNER" is not matching problem

- Root cause: the content description is different with title.
- Solution: set the description same as title.

Fixes: 181192849
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accounts
Change-Id: Ic566d061e78eaf427add6aac4701142a6180e557
This commit is contained in:
Sunny Shao
2021-05-13 13:22:02 +08:00
parent c19ad05b02
commit 2fade46f0a

View File

@@ -325,10 +325,10 @@ public class AccountPreferenceController extends AbstractPreferenceController
mFragment.getPreferenceManager().getContext());
preferenceGroup.setOrder(mAccountProfileOrder++);
if (isSingleProfile()) {
preferenceGroup.setTitle(context.getString(R.string.account_for_section_header,
BidiFormatter.getInstance().unicodeWrap(userInfo.name)));
preferenceGroup.setContentDescription(
mContext.getString(R.string.account_settings));
final String title = context.getString(R.string.account_for_section_header,
BidiFormatter.getInstance().unicodeWrap(userInfo.name));
preferenceGroup.setTitle(title);
preferenceGroup.setContentDescription(title);
} else if (userInfo.isManagedProfile()) {
if (mType == ProfileSelectFragment.ProfileType.ALL) {
preferenceGroup.setTitle(R.string.category_work);