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

Commit fc0abca8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 4fea9e5c fe01b710
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -397,16 +397,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;
            }
        }
    }