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

Commit fe01b710 authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Use 3GPP2 as app type if 3GPP is not available.

Test: atest UiccProfile
Bug: 190353953
Change-Id: I1846429fadea6351959fcb9feeac08756ca4e888
parent d02d5712
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -395,16 +395,21 @@ public class UiccProfile extends IccCard {

    private void setCurrentAppType(boolean isGsm) {
        if (VDBG) log("setCurrentAppType");
        synchronized (mLock) {
        int primaryAppType;
        int secondaryAppType;
        if (isGsm) {
                mCurrentAppType = UiccController.APP_FAM_3GPP;
            } else {
                UiccCardApplication newApp = getApplication(UiccController.APP_FAM_3GPP2);
                if (newApp != null || getApplication(UiccController.APP_FAM_3GPP) == null) {
                    mCurrentAppType = UiccController.APP_FAM_3GPP2;
            primaryAppType = UiccController.APP_FAM_3GPP;
            secondaryAppType = UiccController.APP_FAM_3GPP2;
        } else {
                    mCurrentAppType = UiccController.APP_FAM_3GPP;
            primaryAppType = UiccController.APP_FAM_3GPP2;
            secondaryAppType = UiccController.APP_FAM_3GPP;
        }
        synchronized (mLock) {
            UiccCardApplication newApp = getApplication(primaryAppType);
            if (newApp != null || getApplication(secondaryAppType) == null) {
                mCurrentAppType = primaryAppType;
            } else {
                mCurrentAppType = secondaryAppType;
            }
        }
    }