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

Commit c67c86c7 authored by Holly Jiuyu Sun's avatar Holly Jiuyu Sun
Browse files

Address comments from API review.

1) The newly added onDownloadSubscription should not be abstract.
2) The old onDownloadSubscription should not throw exception.

Bug: 124325362
Test: on phone
Change-Id: Ic905b5d317e10aefe5dca013948cd7d340149368
parent de2861cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6527,7 +6527,7 @@ package android.service.euicc {
    ctor public EuiccService();
    method @CallSuper public android.os.IBinder onBind(android.content.Intent);
    method public abstract int onDeleteSubscription(int, String);
    method public abstract android.service.euicc.DownloadSubscriptionResult onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean, @Nullable android.os.Bundle);
    method public android.service.euicc.DownloadSubscriptionResult onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean, @Nullable android.os.Bundle);
    method @Deprecated public int onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean);
    method public abstract int onEraseSubscriptions(int);
    method public abstract android.service.euicc.GetDefaultDownloadableSubscriptionListResult onGetDefaultDownloadableSubscriptionList(int, boolean);
+10 −7
Original line number Diff line number Diff line
@@ -418,12 +418,15 @@ public abstract class EuiccService extends Service {
     *     bit map, and original the card Id. The result code may be one of the predefined
     *     {@code RESULT_} constants or any implementation-specific code starting with
     *     {@link #RESULT_FIRST_USER}. The resolvable error bit map can be either 0 or values
     *     defined in {@code RESOLVABLE_ERROR_}.
     *     defined in {@code RESOLVABLE_ERROR_}. A subclass should override this method. Otherwise,
     *     this method does nothing and returns null by default.
     * @see android.telephony.euicc.EuiccManager#downloadSubscription
     */
    public abstract DownloadSubscriptionResult onDownloadSubscription(int slotId,
    public DownloadSubscriptionResult onDownloadSubscription(int slotId,
            @NonNull DownloadableSubscription subscription, boolean switchAfterDownload,
            boolean forceDeactivateSim, @Nullable Bundle resolvedBundle);
            boolean forceDeactivateSim, @Nullable Bundle resolvedBundle) {
        return null;
    }

    /**
     * Download the given subscription.
@@ -439,14 +442,14 @@ public abstract class EuiccService extends Service {
     *     constants or any implementation-specific code starting with {@link #RESULT_FIRST_USER}.
     * @see android.telephony.euicc.EuiccManager#downloadSubscription
     *
     * @deprecated From Q, please use the above
     * {@link #onDownloadSubscription(int, DownloadableSubscription, boolean, boolean, Bundle)}.
     * @deprecated From Q, a subclass should use and override the above
     * {@link #onDownloadSubscription(int, DownloadableSubscription, boolean, boolean, Bundle)}. The
     * default return value for this one is Integer.MIN_VALUE.
     */
    @Deprecated public @Result int onDownloadSubscription(int slotId,
            @NonNull DownloadableSubscription subscription, boolean switchAfterDownload,
            boolean forceDeactivateSim) {
        throw new UnsupportedOperationException("onDownloadSubscription(int, "
            + "DownloadableSubscription, boolean, boolean) is deprecated.");
        return Integer.MIN_VALUE;
    }

    /**