aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoonhunshin <joonhunshin@google.com>2022-05-19 14:39:19 +0000
committerjoonhunshin <joonhunshin@google.com>2022-05-23 01:41:00 +0000
commitd342f0b2901e81723e4d4d0c1f613c65dc791d6f (patch)
tree3f9f7027bd0541f81145d8efd9f636d8b1928e20
parent6f7c9bb60a9f80673649044c18863d8ce155ff61 (diff)
downloadims-d342f0b2901e81723e4d4d0c1f613c65dc791d6f.tar.gz
update to handle IllegalArgumentException
ImaManager used ImsProvisioningController. When the subId is not valid, ImsProvisioningController throws IllegalArgumentException. Exception handling code updated for ImsManager. Bug: 233114326 Test: atest ImsManagerTest Change-Id: I634ff650ce1d144bcc19952d99a57140be00056f
-rw-r--r--src/java/com/android/ims/ImsManager.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/java/com/android/ims/ImsManager.java b/src/java/com/android/ims/ImsManager.java
index 257aef91..cf95a20b 100644
--- a/src/java/com/android/ims/ImsManager.java
+++ b/src/java/com/android/ims/ImsManager.java
@@ -1634,7 +1634,7 @@ public class ImsManager implements FeatureUpdates {
try {
return iTelephony.getImsProvisioningStatusForCapability(subId, capability, tech);
- } catch (RemoteException e) {
+ } catch (RemoteException | IllegalArgumentException e) {
logw("getImsProvisionedBoolNoException: operation failed for capability=" + capability
+ ". Exception:" + e.getMessage() + ". Returning false.");
return false;
@@ -1660,7 +1660,7 @@ public class ImsManager implements FeatureUpdates {
try {
return iTelephony.getRcsProvisioningStatusForCapability(subId, capability, tech);
- } catch (RemoteException e) {
+ } catch (RemoteException | IllegalArgumentException e) {
logw("getRcsProvisionedBoolNoException: operation failed for capability=" + capability
+ ". Exception:" + e.getMessage() + ". Returning false.");
return false;
@@ -3157,8 +3157,9 @@ public class ImsManager implements FeatureUpdates {
try {
required = iTelephony.isProvisioningRequiredForCapability(subId, capability,
tech);
- } catch (RemoteException e) {
- logw("isMmTelProvisioningRequired couldn't reach telephony!");
+ } catch (RemoteException | IllegalArgumentException e) {
+ logw("isMmTelProvisioningRequired : operation failed" + " capability=" + capability
+ + " tech=" + tech + ". Exception:" + e.getMessage());
}
log("MmTel Provisioning required " + required + " for capability " + capability);
@@ -3182,8 +3183,9 @@ public class ImsManager implements FeatureUpdates {
try {
required = iTelephony.isRcsProvisioningRequiredForCapability(subId, capability,
tech);
- } catch (RemoteException e) {
- logw("isRcsProvisioningRequired couldn't reach telephony!");
+ } catch (RemoteException | IllegalArgumentException e) {
+ logw("isRcsProvisioningRequired : operation failed" + " capability=" + capability
+ + " tech=" + tech + ". Exception:" + e.getMessage());
}
log("Rcs Provisioning required " + required + " for capability " + capability);