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

Commit 4d028c78 authored by sijia.long's avatar sijia.long Committed by Denis Hsu
Browse files

Fix wrong SIM application type

The application type depends on the applicaitons
information, so when the applicaitons infomation
has been updated, the application type also should
be updated.

Bug: 159761055
Test: manual test pass
Change-Id: I87c2dd241285ddfd2ec3b318a55810a00983bdc6
parent e6e6fe9e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ public class UiccProfile extends IccCard {

    @VisibleForTesting
    public int mCurrentAppType = UiccController.APP_FAM_3GPP; //default to 3gpp?
    private int mRadioTech = ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN;
    private UiccCardApplication mUiccApplication = null;
    private IccRecords mIccRecords = null;
    private IccCardConstants.State mExternalState = IccCardConstants.State.UNKNOWN;
@@ -325,6 +326,7 @@ public class UiccProfile extends IccCard {
            }
            mCatService = null;
            mUiccApplications = null;
            mRadioTech = ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN;
            mCarrierPrivilegeRules = null;
            mContext.getContentResolver().unregisterContentObserver(
                    mProvisionCompleteContentObserver);
@@ -341,6 +343,7 @@ public class UiccProfile extends IccCard {
            if (DBG) {
                log("Setting radio tech " + ServiceState.rilRadioTechnologyToString(radioTech));
            }
            mRadioTech = radioTech;
            setCurrentAppType(ServiceState.isGsm(radioTech));
            updateIccAvailability(false);
        }
@@ -1054,6 +1057,9 @@ public class UiccProfile extends IccCard {
            }

            sanitizeApplicationIndexesLocked();
            if (mRadioTech != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                setCurrentAppType(ServiceState.isGsm(mRadioTech));
            }
            updateIccAvailability(true);
        }
    }