a11y fix: read emergency numbers as digits, not numbers.
Instead of reading as one hundred and ten, it should read as one-one-o. Also make the number override dialog text input box a little bigger Fix: 175517632 Fix: 175514672 Test: robotests Change-Id: I7e3e823792f885004868ede790fc414a3fa66f01
This commit is contained in:
@@ -21,6 +21,8 @@ import android.database.ContentObserver;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.provider.Settings;
|
||||
import android.telephony.PhoneNumberUtils;
|
||||
import android.text.Spannable;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
@@ -69,8 +71,17 @@ public class EmergencyGestureNumberOverridePreferenceController extends BasePref
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getString(R.string.emergency_gesture_call_for_help_summary,
|
||||
mEmergencyNumberUtils.getPoliceNumber());
|
||||
String number = mEmergencyNumberUtils.getPoliceNumber();
|
||||
String summary = mContext.getString(R.string.emergency_gesture_call_for_help_summary,
|
||||
number);
|
||||
int numberStartIndex = summary.indexOf(number);
|
||||
if (numberStartIndex < 0) {
|
||||
return summary;
|
||||
}
|
||||
Spannable summarySpan = Spannable.Factory.getInstance().newSpannable(summary);
|
||||
PhoneNumberUtils.addTtsSpan(summarySpan, numberStartIndex,
|
||||
numberStartIndex + number.length());
|
||||
return summarySpan;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user