diff options
author | Alan Viverette <alanv@google.com> | 2013-03-06 12:39:14 -0800 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2013-03-06 16:41:07 -0800 |
commit | a717fa7aec389df650c4ab4e1c37f3dfdfb2d16f (patch) | |
tree | b94a9487a0718ada797f7eb173840be07dcd87c0 | |
parent | f5bc56a398b20eed03df82f5dacd86aebc35d954 (diff) |
Remove ICS-era accessibility workarounds from Dialer app.
Bug: 8330225
Change-Id: I0c61e12b4090ff6eeaff5ef5791ac62814d90383
-rw-r--r-- | src/com/android/dialer/dialpad/DigitsEditText.java | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/com/android/dialer/dialpad/DigitsEditText.java b/src/com/android/dialer/dialpad/DigitsEditText.java index 6ad4df955..1a092be50 100644 --- a/src/com/android/dialer/dialpad/DigitsEditText.java +++ b/src/com/android/dialer/dialpad/DigitsEditText.java @@ -21,7 +21,6 @@ import android.graphics.Rect; import android.text.InputType; import android.util.AttributeSet; import android.view.MotionEvent; -import android.view.accessibility.AccessibilityEvent; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; @@ -56,31 +55,4 @@ public class DigitsEditText extends EditText { } return ret; } - - @Override - public void sendAccessibilityEventUnchecked(AccessibilityEvent event) { - if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED) { - // Since we're replacing the text every time we add or remove a - // character, only read the difference. (issue 5337550) - final int added = event.getAddedCount(); - final int removed = event.getRemovedCount(); - final int length = event.getBeforeText().length(); - if (added > removed) { - event.setRemovedCount(0); - event.setAddedCount(1); - event.setFromIndex(length); - } else if (removed > added) { - event.setRemovedCount(1); - event.setAddedCount(0); - event.setFromIndex(length - 1); - } else { - return; - } - } else if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_FOCUSED) { - // The parent EditText class lets tts read "edit box" when this View has a focus, which - // confuses users on app launch (issue 5275935). - return; - } - super.sendAccessibilityEventUnchecked(event); - } } |