summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-11-18 03:28:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-11-18 03:28:29 +0000
commit9df107499e4496b5312db76e4f2bd46f6a265b76 (patch)
treef80d72ac7459f92b356221607577e0c59db15f56
parent3155e42d67d232c6070fef2f234262631859bc6d (diff)
parentb66c1d2ff4f4e86b8b8944da1649d9a0d7488abc (diff)
Merge "Use TextUtils.isEmpty() instead of null check."
-rw-r--r--java/com/android/contacts/common/util/ContactDisplayUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/contacts/common/util/ContactDisplayUtils.java b/java/com/android/contacts/common/util/ContactDisplayUtils.java
index ff22f2880..a45394f50 100644
--- a/java/com/android/contacts/common/util/ContactDisplayUtils.java
+++ b/java/com/android/contacts/common/util/ContactDisplayUtils.java
@@ -216,7 +216,7 @@ public class ContactDisplayUtils {
return null;
}
final Spannable spannable = new SpannableString(message);
- int start = phoneNumber == null ? -1 : message.indexOf(phoneNumber);
+ int start = TextUtils.isEmpty(phoneNumber) ? -1 : message.indexOf(phoneNumber);
while (start >= 0) {
final int end = start + phoneNumber.length();
final TtsSpan ttsSpan = PhoneNumberUtilsCompat.createTtsSpan(phoneNumber);