From 690b2c6971c6c8a8ef447a15b24d8dd1506f2d0b Mon Sep 17 00:00:00 2001 From: Ihab Awad Date: Tue, 9 Dec 2014 14:26:29 -0800 Subject: Enable text-to-speech in dialer edit field (1/2) Bug: 18659148 Change-Id: I7c8eeda3e788579efad736b960951802081ff7fd --- src/com/android/phone/common/dialpad/DialpadView.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/com/android') 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() { -- cgit v1.2.3