commit | 2227067d99af771e86ce507e952fd5ff5d429a89 | [log] [tgz] |
---|---|---|
author | Magnus Karlsson <magnus3.karlsson@sonymobile.com> | Wed Feb 06 11:49:24 2013 +0100 |
committer | Henrik Baard <henrik.baard@sonymobile.com> | Thu May 02 09:59:29 2013 +0200 |
tree | afb851c873fc1d3e1f407cd96cb1ea20ee035198 | |
parent | 1f6e789b7ee9698ab8c528a393c28cce500ace04 [diff] |
Fixing crash in PhoneNumberUtils getNumberFromIntent Handling intent with no data when trying to retrieve number from intent. Change-Id: If7c5930e7048aec732fb7a3fbeb3391e1408b071
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index 8b85d8c..3ae2106 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -152,6 +152,11 @@ String number = null; Uri uri = intent.getData(); + + if (uri == null) { + return null; + } + String scheme = uri.getScheme(); if (scheme.equals("tel") || scheme.equals("sip")) {