diff --git a/telephony/java/android/telephony/euicc/EuiccManager.java b/telephony/java/android/telephony/euicc/EuiccManager.java index 4820d332de0f6..eede9dc474f86 100644 --- a/telephony/java/android/telephony/euicc/EuiccManager.java +++ b/telephony/java/android/telephony/euicc/EuiccManager.java @@ -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: *