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:
committed by
Henrik Baard
parent
1f6e789b7e
commit
2227067d99
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user