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

Commit a7cadf43 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "make sure mep flag is set properly" into tm-dev am: fc0a2e37

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/17206692

Change-Id: I2469a6d695fd6af49e401e62c339befaf78a0f69
parents 3e3a55f6 fc0a2e37
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class UiccCard {
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    private CardState mCardState;
    protected String mCardId;
    private boolean mIsSupportsMultipleEnabledProfiles;
    protected boolean mIsSupportsMultipleEnabledProfiles;

    protected HashMap<Integer, UiccPort> mUiccPorts = new HashMap<>();
    private HashMap<Integer, Integer> mPhoneIdToPortIdx = new HashMap<>();
@@ -215,6 +215,7 @@ public class UiccCard {
        pw.println(" mCardState=" + mCardState);
        pw.println(" mCardId=" + mCardId);
        pw.println(" mNumberOfPorts=" + mUiccPorts.size());
        pw.println( "mIsSupportsMultipleEnabledProfiles=" + mIsSupportsMultipleEnabledProfiles);
        pw.println();
        for (UiccPort uiccPort : mUiccPorts.values()) {
            uiccPort.dump(fd, pw, args);
+19 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.uicc.IccCardStatus;
import com.android.internal.telephony.uicc.UiccCard;
import com.android.internal.telephony.uicc.UiccPort;
import com.android.internal.telephony.uicc.euicc.async.AsyncResultCallback;
import com.android.telephony.Rlog;

@@ -53,6 +54,24 @@ public class EuiccCard extends UiccCard {
        }
    }

    /**
     * Updates MEP(Multiple Enabled Profile) support flag.
     *
     * <p>If IccSlotStatus comes later, the number of ports reported is only known after the
     * UiccCard creation which will impact UICC MEP capability.
     */
    @Override
    public void updateSupportMultipleEnabledProfile(boolean supported) {
        mIsSupportsMultipleEnabledProfiles = supported;
        for (UiccPort port : mUiccPorts.values()) {
            if (port instanceof EuiccPort) {
                ((EuiccPort) port).updateSupportMultipleEnabledProfile(supported);
            } else {
                loge("eUICC card has non-euicc port object:" + port.toString());
            }
        }
    }

    @Override
    public void update(Context c, CommandsInterface ci, IccCardStatus ics, int phoneId) {
        synchronized (mLock) {
+9 −0
Original line number Diff line number Diff line
@@ -164,6 +164,15 @@ public class EuiccPort extends UiccPort {
        }
    }

    /**
     * Updates MEP(Multiple Enabled Profile) support flag.
     * The flag can be updated after the port creation.
     */
    public void updateSupportMultipleEnabledProfile(boolean supported) {
        logd("updateSupportMultipleEnabledProfile");
        mIsSupportsMultipleEnabledProfiles = supported;
    }

    /**
     * Gets a list of user-visible profiles.
     *