summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/calllog/PhoneNumberUtilsWrapper.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/dialer/calllog/PhoneNumberUtilsWrapper.java b/src/com/android/dialer/calllog/PhoneNumberUtilsWrapper.java
index 32b49b336..2133f0f9d 100644
--- a/src/com/android/dialer/calllog/PhoneNumberUtilsWrapper.java
+++ b/src/com/android/dialer/calllog/PhoneNumberUtilsWrapper.java
@@ -50,7 +50,7 @@ public class PhoneNumberUtilsWrapper {
* mock-out this, it is not a static method.
*/
public boolean isVoicemailNumber(CharSequence number) {
- return PhoneNumberUtils.isVoiceMailNumber(number.toString());
+ return number!= null && PhoneNumberUtils.isVoiceMailNumber(number.toString());
}
/**
@@ -58,7 +58,7 @@ public class PhoneNumberUtilsWrapper {
* static method.
*/
public boolean isSipNumber(CharSequence number) {
- return PhoneNumberUtils.isUriNumber(number.toString());
+ return number != null && PhoneNumberUtils.isUriNumber(number.toString());
}
public static boolean isUnknownNumberThatCanBeLookedUp(CharSequence number, int presentation) {
@@ -77,13 +77,13 @@ public class PhoneNumberUtilsWrapper {
if (new PhoneNumberUtilsWrapper().isVoicemailNumber(number)) {
return false;
}
- if (isLegacyUnknownNumbers(number.toString())) {
+ if (isLegacyUnknownNumbers(number)) {
return false;
}
return true;
}
public static boolean isLegacyUnknownNumbers(CharSequence number) {
- return LEGACY_UNKNOWN_NUMBERS.contains(number.toString());
+ return number != null && LEGACY_UNKNOWN_NUMBERS.contains(number.toString());
}
}