资料:
https://source.android.google.cn/docs/core/connect/esim-overview?hl=zh-cn
运营商应用:
EuiccManager.java
public void downloadSubscription(DownloadableSubscription subscription,
boolean switchAfterDownload, PendingIntent callbackIntent) {
if (!isEnabled()) {
sendUnavailableError(callbackIntent);
return;
}
try {
getIEuiccController().downloadSubscription(mCardId, subscription, switchAfterDownload,
mContext.getOpPackageName(), null /* resolvedBundle */, callbackIntent);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
EuiccController.java
public void downloadSubscription(int cardId, DownloadableSubscription subscription,
boolean switchAfterDownload, String callingPackage, Bundle resolvedBundle,
PendingIntent callbackIntent) {
// If switchAfterDownload is true, set portIndex as
// {@link android.telephony.TelephonyManager#INVALID_PORT_INDEX} to resolve the port index.
int portIndex = switchAfterDownload ? TelephonyManager.INVALID_PORT_INDEX
: TelephonyManager.DEFAULT_PORT_INDEX;
downloadSubscription(cardId, portIndex, subscription,
switchAfterDownload, callingPackage, false /* forceDeactivateSim */,
resolvedBundle, callbackIntent);
}
LPA:
EuiccService.java
EuiccServiceImpl.java
public DownloadSubscriptionResult onDownloadSubscription(int slotId,
@NonNull DownloadableSubscription subscription, boolean switchAfterDownload,
boolean forceDeactivateSim, @Nullable Bundle resolvedBundle) {