summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIhab Awad <ihab@google.com>2014-12-09 14:26:29 -0800
committerIhab Awad <ihab@google.com>2014-12-09 14:26:29 -0800
commit690b2c6971c6c8a8ef447a15b24d8dd1506f2d0b (patch)
treef408bcb419b8773c0bb17ee4b2471729b61615d0 /src
parentff0faf82c3590d34988a3386720b405db81b2dac (diff)
downloadandroid_packages_apps_PhoneCommon-690b2c6971c6c8a8ef447a15b24d8dd1506f2d0b.tar.gz
android_packages_apps_PhoneCommon-690b2c6971c6c8a8ef447a15b24d8dd1506f2d0b.tar.bz2
android_packages_apps_PhoneCommon-690b2c6971c6c8a8ef447a15b24d8dd1506f2d0b.zip
Enable text-to-speech in dialer edit field (1/2)
Bug: 18659148 Change-Id: I7c8eeda3e788579efad736b960951802081ff7fd
Diffstat (limited to 'src')
-rw-r--r--src/com/android/phone/common/dialpad/DialpadView.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/phone/common/dialpad/DialpadView.java b/src/com/android/phone/common/dialpad/DialpadView.java
index fdce6f7..d59ecee 100644
--- a/src/com/android/phone/common/dialpad/DialpadView.java
+++ b/src/com/android/phone/common/dialpad/DialpadView.java
@@ -30,6 +30,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;
+import android.view.accessibility.AccessibilityManager;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
@@ -112,6 +113,13 @@ public class DialpadView extends LinearLayout {
mRateContainer = (ViewGroup) findViewById(R.id.rate_container);
mIldCountry = (TextView) mRateContainer.findViewById(R.id.ild_country);
mIldRate = (TextView) mRateContainer.findViewById(R.id.ild_rate);
+
+ AccessibilityManager accessibilityManager = (AccessibilityManager)
+ getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
+ if (accessibilityManager.isEnabled()) {
+ // The text view must be selected to send accessibility events.
+ mDigits.setSelected(true);
+ }
}
private void setupKeypad() {