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

Commit e168012f authored by Martijn Coenen's avatar Martijn Coenen Committed by Gerrit Code Review
Browse files

Merge "Implementation of HCE for NFC-F."

parents b7fbe110 c52adfe1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@ LOCAL_SRC_FILES += \
	core/java/android/nfc/INfcAdapterExtras.aidl \
	core/java/android/nfc/INfcTag.aidl \
	core/java/android/nfc/INfcCardEmulation.aidl \
	core/java/android/nfc/INfcFCardEmulation.aidl \
	core/java/android/nfc/INfcUnlockHandler.aidl \
	core/java/android/os/IBatteryPropertiesListener.aidl \
	core/java/android/os/IBatteryPropertiesRegistrar.aidl \
+23 −0
Original line number Diff line number Diff line
@@ -9336,6 +9336,7 @@ package android.content.pm {
    field public static final java.lang.String FEATURE_MIDI = "android.software.midi";
    field public static final java.lang.String FEATURE_NFC = "android.hardware.nfc";
    field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
    field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
    field public static final java.lang.String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
    field public static final java.lang.String FEATURE_PRINTING = "android.software.print";
    field public static final java.lang.String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
@@ -23866,6 +23867,28 @@ package android.nfc.cardemulation {
    field public static final java.lang.String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service";
  }
  public abstract class HostNfcFService extends android.app.Service {
    ctor public HostNfcFService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract void onDeactivated(int);
    method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle);
    method public final void sendResponsePacket(byte[]);
    field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0
    field public static final java.lang.String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE";
    field public static final java.lang.String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service";
  }
  public final class NfcFCardEmulation {
    method public boolean disableNfcFForegroundService(android.app.Activity);
    method public boolean enableNfcFForegroundService(android.app.Activity, android.content.ComponentName);
    method public static synchronized android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter);
    method public java.lang.String getNfcid2ForService(android.content.ComponentName);
    method public java.lang.String getSystemCodeForService(android.content.ComponentName);
    method public boolean registerSystemCodeForService(android.content.ComponentName, java.lang.String);
    method public boolean removeSystemCodeForService(android.content.ComponentName);
    method public boolean setNfcid2ForService(android.content.ComponentName, java.lang.String);
  }
  public abstract class OffHostApduService extends android.app.Service {
    ctor public OffHostApduService();
    method public abstract android.os.IBinder onBind(android.content.Intent);
+23 −0
Original line number Diff line number Diff line
@@ -9630,6 +9630,7 @@ package android.content.pm {
    field public static final java.lang.String FEATURE_MIDI = "android.software.midi";
    field public static final java.lang.String FEATURE_NFC = "android.hardware.nfc";
    field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";
    field public static final java.lang.String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
    field public static final java.lang.String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
    field public static final java.lang.String FEATURE_PRINTING = "android.software.print";
    field public static final java.lang.String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
@@ -25811,6 +25812,28 @@ package android.nfc.cardemulation {
    field public static final java.lang.String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service";
  }
  public abstract class HostNfcFService extends android.app.Service {
    ctor public HostNfcFService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method public abstract void onDeactivated(int);
    method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle);
    method public final void sendResponsePacket(byte[]);
    field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0
    field public static final java.lang.String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE";
    field public static final java.lang.String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service";
  }
  public final class NfcFCardEmulation {
    method public boolean disableNfcFForegroundService(android.app.Activity);
    method public boolean enableNfcFForegroundService(android.app.Activity, android.content.ComponentName);
    method public static synchronized android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter);
    method public java.lang.String getNfcid2ForService(android.content.ComponentName);
    method public java.lang.String getSystemCodeForService(android.content.ComponentName);
    method public boolean registerSystemCodeForService(android.content.ComponentName, java.lang.String);
    method public boolean removeSystemCodeForService(android.content.ComponentName);
    method public boolean setNfcid2ForService(android.content.ComponentName, java.lang.String);
  }
  public abstract class OffHostApduService extends android.app.Service {
    ctor public OffHostApduService();
    method public abstract android.os.IBinder onBind(android.content.Intent);
+8 −0
Original line number Diff line number Diff line
@@ -1293,6 +1293,14 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_NFC_HOST_CARD_EMULATION = "android.hardware.nfc.hce";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device supports host-
     * based NFC-F card emulation.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device supports the OpenGL ES
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.nfc.IAppCallback;
import android.nfc.INfcAdapterExtras;
import android.nfc.INfcTag;
import android.nfc.INfcCardEmulation;
import android.nfc.INfcFCardEmulation;
import android.nfc.INfcUnlockHandler;
import android.os.Bundle;

@@ -36,6 +37,7 @@ interface INfcAdapter
{
    INfcTag getNfcTagInterface();
    INfcCardEmulation getNfcCardEmulationInterface();
    INfcFCardEmulation getNfcFCardEmulationInterface();
    INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);

    int getState();
Loading