Loading telephony/java/android/telephony/euicc/DownloadableSubscription.java +32 −3 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.euicc; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcelable; import android.telephony.UiccAccessRule; import com.android.internal.util.Preconditions; Loading Loading @@ -57,6 +58,8 @@ public final class DownloadableSubscription implements Parcelable { private String carrierName; // see isConsentGranted and setConsentGranted private boolean consentGranted; // see getAccessRules and setAccessRules private UiccAccessRule[] accessRules; /** @hide */ private DownloadableSubscription(String encodedActivationCode) { Loading @@ -67,6 +70,7 @@ public final class DownloadableSubscription implements Parcelable { encodedActivationCode = in.readString(); carrierName = in.readString(); consentGranted = in.readInt() == 1; accessRules = in.createTypedArray(UiccAccessRule.CREATOR); } /** Loading Loading @@ -103,7 +107,7 @@ public final class DownloadableSubscription implements Parcelable { */ @Nullable public String getCarrierName() { return this.carrierName; return carrierName; } Loading @@ -112,7 +116,7 @@ public final class DownloadableSubscription implements Parcelable { * @hide */ public void setConsentGranted() { this.consentGranted = true; consentGranted = true; } /** Loading @@ -125,7 +129,31 @@ public final class DownloadableSubscription implements Parcelable { * TODO(b/35851809): Make this a SystemApi. */ public boolean isConsentGranted() { return this.consentGranted; return consentGranted; } /** * Returns the {@link UiccAccessRule}s dictating access to this subscription. * * <p>Only present for downloadable subscriptions that were queried from a server (as opposed to * those created with {@link #forActivationCode}). May be populated with * {@link EuiccManager#getDownloadableSubscriptionMetadata}. * @hide * * TODO(b/35851809): Make this a SystemApi. */ public UiccAccessRule[] getAccessRules() { return accessRules; } /** * Set the {@link UiccAccessRule}s dictating access to this subscription. * @hide * * TODO(b/35851809): Make this a SystemApi. */ public void setAccessRules(UiccAccessRule[] accessRules) { this.accessRules = accessRules; } /** Loading @@ -144,6 +172,7 @@ public final class DownloadableSubscription implements Parcelable { dest.writeString(encodedActivationCode); dest.writeString(carrierName); dest.writeInt(consentGranted ? 1 : 0); dest.writeTypedArray(accessRules, flags); } @Override Loading telephony/java/android/telephony/euicc/EuiccManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,8 @@ public class EuiccManager { return; } try { mController.downloadSubscription(subscription, switchAfterDownload, callbackIntent); mController.downloadSubscription(subscription, switchAfterDownload, mContext.getOpPackageName(), callbackIntent); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading telephony/java/com/android/internal/telephony/euicc/IEuiccController.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -25,5 +25,5 @@ interface IEuiccController { in PendingIntent callbackIntent); String getEid(); oneway void downloadSubscription(in DownloadableSubscription subscription, boolean switchAfterDownload, in PendingIntent callbackIntent); boolean switchAfterDownload, String callingPackage, in PendingIntent callbackIntent); } No newline at end of file Loading
telephony/java/android/telephony/euicc/DownloadableSubscription.java +32 −3 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.euicc; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcelable; import android.telephony.UiccAccessRule; import com.android.internal.util.Preconditions; Loading Loading @@ -57,6 +58,8 @@ public final class DownloadableSubscription implements Parcelable { private String carrierName; // see isConsentGranted and setConsentGranted private boolean consentGranted; // see getAccessRules and setAccessRules private UiccAccessRule[] accessRules; /** @hide */ private DownloadableSubscription(String encodedActivationCode) { Loading @@ -67,6 +70,7 @@ public final class DownloadableSubscription implements Parcelable { encodedActivationCode = in.readString(); carrierName = in.readString(); consentGranted = in.readInt() == 1; accessRules = in.createTypedArray(UiccAccessRule.CREATOR); } /** Loading Loading @@ -103,7 +107,7 @@ public final class DownloadableSubscription implements Parcelable { */ @Nullable public String getCarrierName() { return this.carrierName; return carrierName; } Loading @@ -112,7 +116,7 @@ public final class DownloadableSubscription implements Parcelable { * @hide */ public void setConsentGranted() { this.consentGranted = true; consentGranted = true; } /** Loading @@ -125,7 +129,31 @@ public final class DownloadableSubscription implements Parcelable { * TODO(b/35851809): Make this a SystemApi. */ public boolean isConsentGranted() { return this.consentGranted; return consentGranted; } /** * Returns the {@link UiccAccessRule}s dictating access to this subscription. * * <p>Only present for downloadable subscriptions that were queried from a server (as opposed to * those created with {@link #forActivationCode}). May be populated with * {@link EuiccManager#getDownloadableSubscriptionMetadata}. * @hide * * TODO(b/35851809): Make this a SystemApi. */ public UiccAccessRule[] getAccessRules() { return accessRules; } /** * Set the {@link UiccAccessRule}s dictating access to this subscription. * @hide * * TODO(b/35851809): Make this a SystemApi. */ public void setAccessRules(UiccAccessRule[] accessRules) { this.accessRules = accessRules; } /** Loading @@ -144,6 +172,7 @@ public final class DownloadableSubscription implements Parcelable { dest.writeString(encodedActivationCode); dest.writeString(carrierName); dest.writeInt(consentGranted ? 1 : 0); dest.writeTypedArray(accessRules, flags); } @Override Loading
telephony/java/android/telephony/euicc/EuiccManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,8 @@ public class EuiccManager { return; } try { mController.downloadSubscription(subscription, switchAfterDownload, callbackIntent); mController.downloadSubscription(subscription, switchAfterDownload, mContext.getOpPackageName(), callbackIntent); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
telephony/java/com/android/internal/telephony/euicc/IEuiccController.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -25,5 +25,5 @@ interface IEuiccController { in PendingIntent callbackIntent); String getEid(); oneway void downloadSubscription(in DownloadableSubscription subscription, boolean switchAfterDownload, in PendingIntent callbackIntent); boolean switchAfterDownload, String callingPackage, in PendingIntent callbackIntent); } No newline at end of file