From a717fa7aec389df650c4ab4e1c37f3dfdfb2d16f Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Wed, 6 Mar 2013 12:39:14 -0800 Subject: Remove ICS-era accessibility workarounds from Dialer app. Bug: 8330225 Change-Id: I0c61e12b4090ff6eeaff5ef5791ac62814d90383 --- src/com/android/dialer/dialpad/DigitsEditText.java | 28 ---------------------- 1 file changed, 28 deletions(-) (limited to 'src/com/android/dialer') 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); - } } -- cgit v1.2.3