summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus3.karlsson@sonymobile.com>2013-02-06 11:49:24 +0100
committerDvTonder <david.vantonder@gmail.com>2013-06-10 21:39:14 -0400
commiteae9890b8cb142d5a4b299c2e2baf24c82749128 (patch)
tree0fb1b72369f1b6a25dcf1aa5500d8ca85369cc80 /telephony
parent0f5cbf489f2de7b6118874cc1cd461c064fb4226 (diff)
downloadframeworks_base-eae9890b8cb142d5a4b299c2e2baf24c82749128.zip
frameworks_base-eae9890b8cb142d5a4b299c2e2baf24c82749128.tar.gz
frameworks_base-eae9890b8cb142d5a4b299c2e2baf24c82749128.tar.bz2
Fixing crash in PhoneNumberUtils getNumberFromIntent
Handling intent with no data when trying to retrieve number from intent. AOSP commit: https://android-review.googlesource.com/#/c/57890/ Change-Id: If7c5930e7048aec732fb7a3fbeb3391e1408b071
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/PhoneNumberUtils.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index f740718..f83ab8d 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -152,6 +152,11 @@ public class PhoneNumberUtils
String number = null;
Uri uri = intent.getData();
+
+ if (uri == null) {
+ return null;
+ }
+
String scheme = uri.getScheme();
if (scheme.equals("tel") || scheme.equals("sip")) {