Fix TalkBack descriptions of keyboard shift mode transition
Bug: 14846348 Change-Id: I32435a31f919974a506e598d1f3cc1b55a0866aemain
parent
402e847477
commit
48b96a6a52
|
@ -156,14 +156,28 @@ public final class MainKeyboardAccessibilityDelegate
|
||||||
case KeyboardId.ELEMENT_ALPHABET:
|
case KeyboardId.ELEMENT_ALPHABET:
|
||||||
if (lastElementId == KeyboardId.ELEMENT_ALPHABET
|
if (lastElementId == KeyboardId.ELEMENT_ALPHABET
|
||||||
|| lastElementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
|
|| lastElementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
|
||||||
|
// Transition between alphabet mode and automatic shifted mode should be silently
|
||||||
|
// ignored because it can be determined by each key's talk back announce.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resId = R.string.spoken_description_mode_alpha;
|
resId = R.string.spoken_description_mode_alpha;
|
||||||
break;
|
break;
|
||||||
case KeyboardId.ELEMENT_ALPHABET_MANUAL_SHIFTED:
|
case KeyboardId.ELEMENT_ALPHABET_MANUAL_SHIFTED:
|
||||||
|
if (lastElementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
|
||||||
|
// Resetting automatic shifted mode by pressing the shift key causes the transition
|
||||||
|
// from automatic shifted to manual shifted that should be silently ignored.
|
||||||
|
return;
|
||||||
|
}
|
||||||
resId = R.string.spoken_description_shiftmode_on;
|
resId = R.string.spoken_description_shiftmode_on;
|
||||||
break;
|
break;
|
||||||
case KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCK_SHIFTED:
|
case KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCK_SHIFTED:
|
||||||
|
if (lastElementId == KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCKED) {
|
||||||
|
// Resetting caps locked mode by pressing the shift key causes the transition
|
||||||
|
// from shift locked to shift lock shifted that should be silently ignored.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resId = R.string.spoken_description_shiftmode_locked;
|
||||||
|
break;
|
||||||
case KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCKED:
|
case KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCKED:
|
||||||
resId = R.string.spoken_description_shiftmode_locked;
|
resId = R.string.spoken_description_shiftmode_locked;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue