PhoneNumberUtilWrapper can also throw IllegalArgumentException on bad tel

This commit is contained in:
Stephen Paul Weber 2022-03-28 18:06:38 -05:00
parent fcadbeee99
commit 0ba3cbb99c
No known key found for this signature in database
GPG Key ID: D11C2911CE519CDE
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ public class ConnectionService extends android.telecom.ConnectionService {
String tel = PhoneNumberUtils.extractNetworkPortion(rawTel);
try {
tel = PhoneNumberUtilWrapper.normalize(this, tel);
} catch (NumberParseException e) {
} catch (IllegalArgumentException | NumberParseException e) {
return Connection.createFailedConnection(
new DisconnectCause(DisconnectCause.ERROR)
);