Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / library / aosp-stubs / src / main / java / android / service / euicc / EuiccService.java

EuiccService.java71 lines · 2.7 KiBRaw
1package android.service.euicc;
2
3import android.app.Service;
4import android.content.Intent;
5import android.os.IBinder;
6import android.telephony.euicc.DownloadableSubscription;
7import android.telephony.euicc.EuiccInfo;
8
9/**
10 * Compile-only stub of the framework's {@code @SystemApi}
11 * {@code android.service.euicc.EuiccService}. Mirrors the AOSP abstract surface
12 * the LPA must implement. Not packaged; the real class is provided by the
13 * framework at runtime.
14 */
15public abstract class EuiccService extends Service {
16 public static final int RESULT_OK = 0;
17 public static final int RESULT_MUST_DEACTIVATE_SIM = 1;
18 public static final int RESULT_RESOLVABLE_ERRORS = 2;
19 public static final int RESULT_FIRST_USER = 10;
20
21 public static final int OTA_STATUS_NOT_UPDATED = 1;
22
23 public interface OtaStatusChangedCallback {
24 void onOtaStatusChanged(int status);
25 }
26
27 @Override
28 public IBinder onBind(Intent intent) {
29 return null;
30 }
31
32 public abstract String onGetEid(int slotId);
33
34 public abstract int onGetOtaStatus(int slotId);
35
36 public abstract void onStartOtaIfNecessary(int slotId, OtaStatusChangedCallback statusChangedCallback);
37
38 public abstract GetDownloadableSubscriptionMetadataResult onGetDownloadableSubscriptionMetadata(
39 int slotId, DownloadableSubscription subscription, boolean forceDeactivateSim);
40
41 public abstract GetDefaultDownloadableSubscriptionListResult onGetDefaultDownloadableSubscriptionList(
42 int slotId, boolean forceDeactivateSim);
43
44 public abstract GetEuiccProfileInfoListResult onGetEuiccProfileInfoList(int slotId);
45
46 public abstract EuiccInfo onGetEuiccInfo(int slotId);
47
48 public abstract int onDeleteSubscription(int slotId, String iccid);
49
50 public abstract int onSwitchToSubscription(int slotId, String iccid, boolean forceDeactivateSim);
51
52 /**
53 * Port-aware switch (MEP devices). The framework's default throws
54 * {@code UnsupportedOperationException}, which crashes the LPA process when
55 * Settings calls it — every override must exist even on single-port eUICCs.
56 */
57 public int onSwitchToSubscriptionWithPort(
58 int slotId, int portIndex, String iccid, boolean forceDeactivateSim) {
59 throw new UnsupportedOperationException("LPA must override onSwitchToSubscriptionWithPort");
60 }
61
62 public abstract int onUpdateSubscriptionNickname(int slotId, String iccid, String nickname);
63
64 public abstract int onEraseSubscriptions(int slotId);
65
66 public abstract int onRetainSubscriptionsForFactoryReset(int slotId);
67
68 public abstract int onDownloadSubscription(
69 int slotId, DownloadableSubscription subscription, boolean switchAfterDownload,
70 boolean forceDeactivateSim);
71}