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

Commit d58806ea 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: I39e710fe4aa81569817e68ae4819d1265a0c6f46
parents 306731c4 fc0a2e37
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -49,7 +49,7 @@ public class UiccCard {
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    private CardState mCardState;
    private CardState mCardState;
    protected String mCardId;
    protected String mCardId;
    private boolean mIsSupportsMultipleEnabledProfiles;
    protected boolean mIsSupportsMultipleEnabledProfiles;


    protected HashMap<Integer, UiccPort> mUiccPorts = new HashMap<>();
    protected HashMap<Integer, UiccPort> mUiccPorts = new HashMap<>();
    private HashMap<Integer, Integer> mPhoneIdToPortIdx = new HashMap<>();
    private HashMap<Integer, Integer> mPhoneIdToPortIdx = new HashMap<>();
@@ -215,6 +215,7 @@ public class UiccCard {
        pw.println(" mCardState=" + mCardState);
        pw.println(" mCardState=" + mCardState);
        pw.println(" mCardId=" + mCardId);
        pw.println(" mCardId=" + mCardId);
        pw.println(" mNumberOfPorts=" + mUiccPorts.size());
        pw.println(" mNumberOfPorts=" + mUiccPorts.size());
        pw.println( "mIsSupportsMultipleEnabledProfiles=" + mIsSupportsMultipleEnabledProfiles);
        pw.println();
        pw.println();
        for (UiccPort uiccPort : mUiccPorts.values()) {
        for (UiccPort uiccPort : mUiccPorts.values()) {
            uiccPort.dump(fd, pw, args);
            uiccPort.dump(fd, pw, args);
+19 −0
Original line number Original line 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.CommandsInterface;
import com.android.internal.telephony.uicc.IccCardStatus;
import com.android.internal.telephony.uicc.IccCardStatus;
import com.android.internal.telephony.uicc.UiccCard;
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.internal.telephony.uicc.euicc.async.AsyncResultCallback;
import com.android.telephony.Rlog;
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
    @Override
    public void update(Context c, CommandsInterface ci, IccCardStatus ics, int phoneId) {
    public void update(Context c, CommandsInterface ci, IccCardStatus ics, int phoneId) {
        synchronized (mLock) {
        synchronized (mLock) {
+9 −0
Original line number Original line 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.
     * Gets a list of user-visible profiles.
     *
     *