Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d342f0b2 authored by joonhunshin's avatar joonhunshin
Browse files

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
parent 6f7c9bb6
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -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);