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

Commit 34a76e01 authored by Chen Xu's avatar Chen Xu Committed by Automerger Merge Worker
Browse files

Merge "Do not resolve port index for apps not targeting SDK T and beyond" into...

Merge "Do not resolve port index for apps not targeting SDK T and beyond" into tm-dev am: 523145c4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17263182



Change-Id: Ie5477f3b5a652a55bc7b914b36a14264b9f2654c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 60cf8076 523145c4
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -25,12 +25,14 @@ import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.app.Activity;
import android.app.PendingIntent;
import android.app.compat.CompatChanges;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledSince;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.pm.PackageManager;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
import android.os.RemoteException;
@@ -827,6 +829,18 @@ public class EuiccManager {
    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.TIRAMISU)
    public static final long SWITCH_WITHOUT_PORT_INDEX_EXCEPTION_ON_DISABLE = 218393363L;

    /**
     * With support for MEP(multiple enabled profile) in Android T, a SIM card can enable multiple
     * profile on different port. If apps are not target SDK T yet and keep calling the
     * switchToSubscription or download API without specifying the port index, we should
     * keep the existing behaviour by always use port index 0 even the device itself has MEP eUICC,
     * this is for carrier app's backward compatibility.
     * @hide
     */
    @ChangeId
    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.TIRAMISU)
    public static final long SHOULD_RESOLVE_PORT_INDEX_FOR_APPS = 224562872L;

    private final Context mContext;
    private int mCardId;

@@ -1165,7 +1179,8 @@ public class EuiccManager {
     * subscription on the eUICC and the platform will internally resolve a port based on following
     * rules:
     * <ul>
     *    <li>always use the default port 0 is eUICC does not support MEP.
     *    <li>always use the default port 0 is eUICC does not support MEP or the apps are
     *    not targeting on Android T.
     *    <li>In SS(Single SIM) mode, if the embedded slot already has an active port, then enable
     *    the subscription on this port.
     *    <li>In SS mode, if the embedded slot is not active, then try to enable the subscription on