PhoneNumberUtilWrapper can also throw IllegalArgumentException on bad tel
This commit is contained in:
parent
fcadbeee99
commit
0ba3cbb99c
|
@ -99,7 +99,7 @@ public class ConnectionService extends android.telecom.ConnectionService {
|
||||||
String tel = PhoneNumberUtils.extractNetworkPortion(rawTel);
|
String tel = PhoneNumberUtils.extractNetworkPortion(rawTel);
|
||||||
try {
|
try {
|
||||||
tel = PhoneNumberUtilWrapper.normalize(this, tel);
|
tel = PhoneNumberUtilWrapper.normalize(this, tel);
|
||||||
} catch (NumberParseException e) {
|
} catch (IllegalArgumentException | NumberParseException e) {
|
||||||
return Connection.createFailedConnection(
|
return Connection.createFailedConnection(
|
||||||
new DisconnectCause(DisconnectCause.ERROR)
|
new DisconnectCause(DisconnectCause.ERROR)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue