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

Commit 5632c669 authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Handle exception in getSimStateForSlotIndex.

An IllegalStateException is possible but it should not be propogated
to the remote caller.

Test: basic sanity
Bug: 128939123
Change-Id: I5f75e79fb0ce57176a805b92aa57c0f021ea0197
parent 06c62371
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2375,7 +2375,12 @@ public class SubscriptionController extends ISub.Stub {
            simState = IccCardConstants.State.UNKNOWN;
            err = "invalid slotIndex";
        } else {
            Phone phone = PhoneFactory.getPhone(slotIndex);
            Phone phone = null;
            try {
                phone = PhoneFactory.getPhone(slotIndex);
            } catch (IllegalStateException e) {
                // ignore
            }
            if (phone == null) {
                simState = IccCardConstants.State.UNKNOWN;
                err = "phone == null";