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

View file

@ -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)
); );