Fixing crash in PhoneNumberUtils getNumberFromIntent

Handling intent with no data when trying to retrieve number from
intent.

Change-Id: If7c5930e7048aec732fb7a3fbeb3391e1408b071
This commit is contained in:
Magnus Karlsson
2013-02-06 11:49:24 +01:00
committed by Henrik Baard
parent 1f6e789b7e
commit 2227067d99

View File

@@ -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")) {