Merge "Don't crash if IMEI is empty"

This commit is contained in:
TreeHugger Robot
2018-06-08 19:07:22 +00:00
committed by Android (Google) Code Review
2 changed files with 18 additions and 0 deletions

View File

@@ -53,6 +53,9 @@ public class ImeiInfoDialogController {
static final int ID_GSM_SETTINGS = R.id.gsm_settings;
private static CharSequence getTextAsDigits(CharSequence text) {
if (TextUtils.isEmpty(text)) {
return "";
}
if (TextUtils.isDigitsOnly(text)) {
final Spannable spannable = new SpannableStringBuilder(text);
final TtsSpan span = new TtsSpan.DigitsBuilder(text.toString()).build();