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

Commit d8e58c9a authored by ziyiw's avatar ziyiw
Browse files

[framework] Add Unknown error code and java doc for subscriptionId.

Bug: 380868368
Test: compile

Change-Id: I04fe8db2a9354fb9546bca0cbe685eb98b356fa9
parent a2976e93
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -250,6 +250,7 @@ package android.nfc.cardemulation {
    field @FlaggedApi("android.nfc.enable_card_emulation_euicc") public static final int SET_SUBSCRIPTION_ID_STATUS_FAILED_INVALID_SUBSCRIPTION_ID = 1; // 0x1
    field @FlaggedApi("android.nfc.enable_card_emulation_euicc") public static final int SET_SUBSCRIPTION_ID_STATUS_FAILED_NOT_SUPPORTED = 3; // 0x3
    field @FlaggedApi("android.nfc.enable_card_emulation_euicc") public static final int SET_SUBSCRIPTION_ID_STATUS_SUCCESS = 0; // 0x0
    field @FlaggedApi("android.nfc.enable_card_emulation_euicc") public static final int SET_SUBSCRIPTION_ID_STATUS_UNKNOWN = -1; // 0xffffffff
  }

}
+13 −3
Original line number Diff line number Diff line
@@ -1095,6 +1095,14 @@ public final class CardEmulation {
    @FlaggedApi(android.nfc.Flags.FLAG_ENABLE_CARD_EMULATION_EUICC)
    public static final int SET_SUBSCRIPTION_ID_STATUS_FAILED_NOT_SUPPORTED = 3;

    /**
     * Setting the default subscription ID failed because of unknown error.
     * @hide
     */
    @SystemApi
    @FlaggedApi(Flags.FLAG_ENABLE_CARD_EMULATION_EUICC)
    public static final int SET_SUBSCRIPTION_ID_STATUS_UNKNOWN = -1;

    /** @hide */
    @IntDef(prefix = "SET_SUBSCRIPTION_ID_STATUS_",
            value = {
@@ -1102,6 +1110,7 @@ public final class CardEmulation {
                    SET_SUBSCRIPTION_ID_STATUS_FAILED_INVALID_SUBSCRIPTION_ID,
                    SET_SUBSCRIPTION_ID_STATUS_FAILED_INTERNAL_ERROR,
                    SET_SUBSCRIPTION_ID_STATUS_FAILED_NOT_SUPPORTED,
                    SET_SUBSCRIPTION_ID_STATUS_UNKNOWN
            })
    @Retention(RetentionPolicy.SOURCE)
    public @interface SetSubscriptionIdStatus {}
@@ -1110,9 +1119,10 @@ public final class CardEmulation {
     * Sets the system's default NFC subscription id.
     *
     * <p> For devices with multiple UICC/EUICC that is configured to be NFCEE, this sets the
     * default UICC NFCEE that will handle NFC offhost CE transactoions </p>
     * default UICC NFCEE that will handle NFC offhost CE transactions </p>
     *
     * @param subscriptionId the default NFC subscription Id to set.
     * @param subscriptionId the default NFC subscription Id to set. User can get subscription id
     *                       from {@link SubscriptionManager#getSubscriptionId(int)}
     * @return status of the operation.
     *
     * @throws UnsupportedOperationException If the device does not have
@@ -1134,7 +1144,7 @@ public final class CardEmulation {
     * Returns the system's default NFC subscription id.
     *
     * <p> For devices with multiple UICC/EUICC that is configured to be NFCEE, this returns the
     * default UICC NFCEE that will handle NFC offhost CE transactoions </p>
     * default UICC NFCEE that will handle NFC offhost CE transactions </p>
     * <p> If the device has no UICC that can serve as NFCEE, this will return
     * {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID}.</p>
     *