Always announcing wrong pattern now for talkback in pattern settings

Bug: 21797216
Change-Id: If86078f2d711a80e4a4aa28ce8817aed8244d30b
This commit is contained in:
Selim Cinek
2015-06-25 17:42:58 -04:00
parent f0eebe7e9d
commit 00da4f6d3b

View File

@@ -580,6 +580,7 @@ public class ChooseLockPattern extends SettingsActivity {
// the rest of the stuff varies enough that it is easier just to handle // the rest of the stuff varies enough that it is easier just to handle
// on a case by case basis. // on a case by case basis.
mLockPatternView.setDisplayMode(DisplayMode.Correct); mLockPatternView.setDisplayMode(DisplayMode.Correct);
boolean announceAlways = false;
switch (mUiStage) { switch (mUiStage) {
case Introduction: case Introduction:
@@ -591,6 +592,7 @@ public class ChooseLockPattern extends SettingsActivity {
case ChoiceTooShort: case ChoiceTooShort:
mLockPatternView.setDisplayMode(DisplayMode.Wrong); mLockPatternView.setDisplayMode(DisplayMode.Wrong);
postClearPatternRunnable(); postClearPatternRunnable();
announceAlways = true;
break; break;
case FirstChoiceValid: case FirstChoiceValid:
break; break;
@@ -600,6 +602,7 @@ public class ChooseLockPattern extends SettingsActivity {
case ConfirmWrong: case ConfirmWrong:
mLockPatternView.setDisplayMode(DisplayMode.Wrong); mLockPatternView.setDisplayMode(DisplayMode.Wrong);
postClearPatternRunnable(); postClearPatternRunnable();
announceAlways = true;
break; break;
case ChoiceConfirmed: case ChoiceConfirmed:
break; break;
@@ -607,7 +610,7 @@ public class ChooseLockPattern extends SettingsActivity {
// If the stage changed, announce the header for accessibility. This // If the stage changed, announce the header for accessibility. This
// is a no-op when accessibility is disabled. // is a no-op when accessibility is disabled.
if (previousStage != stage) { if (previousStage != stage || announceAlways) {
mHeaderText.announceForAccessibility(mHeaderText.getText()); mHeaderText.announceForAccessibility(mHeaderText.getText());
} }
} }