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

Commit b781605c authored by SongFerng Wang's avatar SongFerng Wang Committed by Cherrypicker Worker
Browse files

Catch IllegalArgumentException when getting provisioning status

getProvisioningStatusForCapability still need the IllegalArgumentException when the subId is -1.

Bug: 346600036
Test: manual test. Disable sim and the settings did not crash.
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:37e1d258f88c5129035501d6ced1dab6627da102)
Merged-In: Ib5c41ab9214cf34a17ef02864dccffb5371cfe3a
Change-Id: Ib5c41ab9214cf34a17ef02864dccffb5371cfe3a
parent d67de483
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -53,10 +53,10 @@ public class ImsQueryProvisioningStat implements ImsQuery {
     */
    public boolean query() {
        try {
            final ProvisioningManager privisionManager =
            final ProvisioningManager provisioningManager =
                    ProvisioningManager.createForSubscriptionId(mSubId);
            return privisionManager.getProvisioningStatusForCapability(mCapability, mTech);
        } catch (UnsupportedOperationException exception) {
            return provisioningManager.getProvisioningStatusForCapability(mCapability, mTech);
        } catch (IllegalArgumentException | UnsupportedOperationException exception) {
            Log.w(LOG_TAG, "fail to get Provisioning stat. subId=" + mSubId, exception);
        }
        return false;