Announce dynamic content changes in lock confirmation settings.

Also re-orders updateStage() and setText/Selection calls so that text
events don't flush announcements. This does not change functionality.

Bug: 7256500
Change-Id: I8b10d66e9f73c7a630a8c3c5128372e18f26234c
This commit is contained in:
alanv
2012-10-03 17:10:50 -07:00
parent a8f3a204d9
commit eef72c39ae
4 changed files with 24 additions and 3 deletions

View File

@@ -429,6 +429,7 @@ public class ChooseLockPattern extends PreferenceActivity {
* @param stage
*/
protected void updateStage(Stage stage) {
final Stage previousStage = mUiStage;
mUiStage = stage;
@@ -493,6 +494,12 @@ public class ChooseLockPattern extends PreferenceActivity {
case ChoiceConfirmed:
break;
}
// If the stage changed, announce the header for accessibility. This
// is a no-op when accessibility is disabled.
if (previousStage != stage) {
mHeaderText.announceForAccessibility(mHeaderText.getText());
}
}