Merge "Ensure null/empty phone number does not crash international number check." into oc-dev

am: 0f542b48fb

Change-Id: I6b534dbb9253ad66c850c8d55a8e4b0b619ac64e
This commit is contained in:
Tyler Gunn
2017-06-01 07:14:29 +00:00
committed by android-build-merger

View File

@@ -1449,6 +1449,11 @@ public class PhoneNumberUtils
* @hide
*/
public static boolean isInternationalNumber(String phoneNumber, String defaultCountryIso) {
// If no phone number is provided, it can't be international.
if (TextUtils.isEmpty(phoneNumber)) {
return false;
}
// If it starts with # or * its not international.
if (phoneNumber.startsWith("#") || phoneNumber.startsWith("*")) {
return false;