Loading nfc/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ package android.nfc.cardemulation { public final class CardEmulation { method @FlaggedApi("android.permission.flags.wallet_role_enabled") @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static android.content.ComponentName getPreferredPaymentService(@NonNull android.content.Context); method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public java.util.List<android.nfc.cardemulation.ApduServiceInfo> getServices(@NonNull String, int); method @FlaggedApi("android.nfc.enable_card_emulation_euicc") public boolean isEuiccSupported(); method @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public void overrideRoutingTable(@NonNull android.app.Activity, int, int); method @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public void recoverRoutingTable(@NonNull android.app.Activity); } Loading nfc/java/android/nfc/INfcCardEmulation.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -50,4 +50,5 @@ interface INfcCardEmulation void overrideRoutingTable(int userHandle, String protocol, String technology, in String pkg); void recoverRoutingTable(int userHandle); boolean isEuiccSupported(); } nfc/java/android/nfc/NfcAdapter.java +6 −1 Original line number Diff line number Diff line Loading @@ -721,7 +721,7 @@ public final class NfcAdapter { * * @return List<String> containing secure elements on the device which supports * off host card emulation. eSE for Embedded secure element, * SIM for UICC and so on. * SIM for UICC, eSIM for EUICC and so on. * @hide */ public @NonNull List<String> getSupportedOffHostSecureElements() { Loading @@ -741,6 +741,11 @@ public final class NfcAdapter { if (pm.hasSystemFeature(PackageManager.FEATURE_NFC_OFF_HOST_CARD_EMULATION_ESE)) { offHostSE.add("eSE"); } if (Flags.enableCardEmulationEuicc() && callServiceReturn( () -> sCardEmulationService.isEuiccSupported(), false)) { offHostSE.add("eSIM"); } return offHostSE; } Loading nfc/java/android/nfc/cardemulation/ApduServiceInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,8 @@ public final class ApduServiceInfo implements Parcelable { mOffHostName = "eSE1"; } else if (mOffHostName.equals("SIM")) { mOffHostName = "SIM1"; } else if (Flags.enableCardEmulationEuicc() && mOffHostName.equals("eSIM")) { mOffHostName = "eSIM1"; } } mStaticOffHostName = mOffHostName; Loading nfc/java/android/nfc/cardemulation/CardEmulation.java +18 −2 Original line number Diff line number Diff line Loading @@ -548,11 +548,13 @@ public final class CardEmulation { List<String> validSE = adapter.getSupportedOffHostSecureElements(); if ((offHostSecureElement.startsWith("eSE") && !validSE.contains("eSE")) || (offHostSecureElement.startsWith("SIM") && !validSE.contains("SIM"))) { || (offHostSecureElement.startsWith("SIM") && !validSE.contains("SIM")) || (offHostSecureElement.startsWith("eSIM") && !validSE.contains("eSIM"))) { return false; } if (!offHostSecureElement.startsWith("eSE") && !offHostSecureElement.startsWith("SIM")) { if (!offHostSecureElement.startsWith("eSE") && !offHostSecureElement.startsWith("SIM") && !(Flags.enableCardEmulationEuicc() && offHostSecureElement.startsWith("eSIM"))) { return false; } Loading @@ -560,6 +562,8 @@ public final class CardEmulation { offHostSecureElement = "eSE1"; } else if (offHostSecureElement.equals("SIM")) { offHostSecureElement = "SIM1"; } else if (Flags.enableCardEmulationEuicc() && offHostSecureElement.equals("eSIM")) { offHostSecureElement = "eSIM1"; } final String offHostSecureElementV = new String(offHostSecureElement); return callServiceReturn(() -> Loading Loading @@ -984,6 +988,18 @@ public final class CardEmulation { mContext.getUser().getIdentifier())); } /** * Is EUICC supported as a Secure Element EE which supports off host card emulation. * * @return true if the device supports EUICC for off host card emulation, false otherwise. * @hide */ @SystemApi @FlaggedApi(android.nfc.Flags.FLAG_ENABLE_CARD_EMULATION_EUICC) public boolean isEuiccSupported() { return callServiceReturn(() -> sService.isEuiccSupported(), false); } /** * Returns the value of {@link Settings.Secure#NFC_PAYMENT_DEFAULT_COMPONENT}. * Loading Loading
nfc/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ package android.nfc.cardemulation { public final class CardEmulation { method @FlaggedApi("android.permission.flags.wallet_role_enabled") @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static android.content.ComponentName getPreferredPaymentService(@NonNull android.content.Context); method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public java.util.List<android.nfc.cardemulation.ApduServiceInfo> getServices(@NonNull String, int); method @FlaggedApi("android.nfc.enable_card_emulation_euicc") public boolean isEuiccSupported(); method @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public void overrideRoutingTable(@NonNull android.app.Activity, int, int); method @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public void recoverRoutingTable(@NonNull android.app.Activity); } Loading
nfc/java/android/nfc/INfcCardEmulation.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -50,4 +50,5 @@ interface INfcCardEmulation void overrideRoutingTable(int userHandle, String protocol, String technology, in String pkg); void recoverRoutingTable(int userHandle); boolean isEuiccSupported(); }
nfc/java/android/nfc/NfcAdapter.java +6 −1 Original line number Diff line number Diff line Loading @@ -721,7 +721,7 @@ public final class NfcAdapter { * * @return List<String> containing secure elements on the device which supports * off host card emulation. eSE for Embedded secure element, * SIM for UICC and so on. * SIM for UICC, eSIM for EUICC and so on. * @hide */ public @NonNull List<String> getSupportedOffHostSecureElements() { Loading @@ -741,6 +741,11 @@ public final class NfcAdapter { if (pm.hasSystemFeature(PackageManager.FEATURE_NFC_OFF_HOST_CARD_EMULATION_ESE)) { offHostSE.add("eSE"); } if (Flags.enableCardEmulationEuicc() && callServiceReturn( () -> sCardEmulationService.isEuiccSupported(), false)) { offHostSE.add("eSIM"); } return offHostSE; } Loading
nfc/java/android/nfc/cardemulation/ApduServiceInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,8 @@ public final class ApduServiceInfo implements Parcelable { mOffHostName = "eSE1"; } else if (mOffHostName.equals("SIM")) { mOffHostName = "SIM1"; } else if (Flags.enableCardEmulationEuicc() && mOffHostName.equals("eSIM")) { mOffHostName = "eSIM1"; } } mStaticOffHostName = mOffHostName; Loading
nfc/java/android/nfc/cardemulation/CardEmulation.java +18 −2 Original line number Diff line number Diff line Loading @@ -548,11 +548,13 @@ public final class CardEmulation { List<String> validSE = adapter.getSupportedOffHostSecureElements(); if ((offHostSecureElement.startsWith("eSE") && !validSE.contains("eSE")) || (offHostSecureElement.startsWith("SIM") && !validSE.contains("SIM"))) { || (offHostSecureElement.startsWith("SIM") && !validSE.contains("SIM")) || (offHostSecureElement.startsWith("eSIM") && !validSE.contains("eSIM"))) { return false; } if (!offHostSecureElement.startsWith("eSE") && !offHostSecureElement.startsWith("SIM")) { if (!offHostSecureElement.startsWith("eSE") && !offHostSecureElement.startsWith("SIM") && !(Flags.enableCardEmulationEuicc() && offHostSecureElement.startsWith("eSIM"))) { return false; } Loading @@ -560,6 +562,8 @@ public final class CardEmulation { offHostSecureElement = "eSE1"; } else if (offHostSecureElement.equals("SIM")) { offHostSecureElement = "SIM1"; } else if (Flags.enableCardEmulationEuicc() && offHostSecureElement.equals("eSIM")) { offHostSecureElement = "eSIM1"; } final String offHostSecureElementV = new String(offHostSecureElement); return callServiceReturn(() -> Loading Loading @@ -984,6 +988,18 @@ public final class CardEmulation { mContext.getUser().getIdentifier())); } /** * Is EUICC supported as a Secure Element EE which supports off host card emulation. * * @return true if the device supports EUICC for off host card emulation, false otherwise. * @hide */ @SystemApi @FlaggedApi(android.nfc.Flags.FLAG_ENABLE_CARD_EMULATION_EUICC) public boolean isEuiccSupported() { return callServiceReturn(() -> sService.isEuiccSupported(), false); } /** * Returns the value of {@link Settings.Secure#NFC_PAYMENT_DEFAULT_COMPONENT}. * Loading