Talkback improvements for Settings screens.

Bug: 21164141
Change-Id: I7444261ccf967f6db70c9fe44a00bd3f19ceb975
This commit is contained in:
Julia Reynolds
2015-07-08 16:56:31 -04:00
parent 64e1e15d10
commit ce25af4838
12 changed files with 139 additions and 3 deletions

View File

@@ -168,6 +168,24 @@ public class MasterClear extends InstrumentedFragment {
final UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE);
loadAccountList(um);
StringBuffer contentDescription = new StringBuffer();
View masterClearContainer = mContentView.findViewById(R.id.master_clear_container);
getContentDescription(masterClearContainer, contentDescription);
masterClearContainer.setContentDescription(contentDescription);
}
private void getContentDescription(View v, StringBuffer description) {
if (v instanceof ViewGroup) {
ViewGroup vGroup = (ViewGroup) v;
for (int i = 0; i < vGroup.getChildCount(); i++) {
View nextChild = vGroup.getChildAt(i);
getContentDescription(nextChild, description);
}
} else if (v instanceof TextView) {
TextView vText = (TextView) v;
description.append(vText.getText());
description.append(","); // Allow Talkback to pause between sections.
}
}
private boolean isExtStorageEncrypted() {