From af875ddb29639a62125f667bd8488ab9f07f11b5 Mon Sep 17 00:00:00 2001 From: Ta-wei Yen Date: Tue, 3 Nov 2015 15:57:03 -0800 Subject: Fix "Cleared text" announcement when placing a call + Accessibility for the dialpad EditBox is temporarily disabled while DialtactsActvity.hideDialpadFragment() is called with true for clearDialpad. Bug:24570971 Change-Id: Ieeab034a65a66910c02981f7ba6505a768ddef33 --- src/com/android/dialer/DialtactsActivity.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/com/android/dialer/DialtactsActivity.java') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 9105e6f5a..0881582fe 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -48,7 +48,6 @@ import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.View.OnDragListener; -import android.view.View.OnTouchListener; import android.view.ViewTreeObserver; import android.view.animation.Animation; import android.view.animation.AnimationUtils; @@ -83,16 +82,14 @@ import com.android.dialer.list.SearchFragment; import com.android.dialer.list.SmartDialSearchFragment; import com.android.dialer.list.SpeedDialFragment; import com.android.dialer.settings.DialerSettingsActivity; +import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; -import com.android.dialer.util.TelecomUtil; import com.android.dialer.util.IntentUtil.CallIntentBuilder; -import com.android.dialer.util.DialerUtils; +import com.android.dialer.util.TelecomUtil; import com.android.dialer.widget.ActionBarController; import com.android.dialer.widget.SearchEditTextLayout; -import com.android.dialer.widget.SearchEditTextLayout.Callback; import com.android.dialerbind.DatabaseHelperManager; import com.android.dialerbind.ObjectFactory; -import com.android.incallui.Call.LogState; import com.android.phone.common.animation.AnimUtils; import com.android.phone.common.animation.AnimationListenerAdapter; @@ -782,7 +779,13 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return; } if (clearDialpad) { + // Temporarily disable accessibility when we clear the dialpad, since it should be + // invisible and should not announce anything. + mDialpadFragment.getDigitsWidget().setImportantForAccessibility( + View.IMPORTANT_FOR_ACCESSIBILITY_NO); mDialpadFragment.clearDialpad(); + mDialpadFragment.getDigitsWidget().setImportantForAccessibility( + View.IMPORTANT_FOR_ACCESSIBILITY_AUTO); } if (!mIsDialpadShown) { return; -- cgit v1.2.3