Loading Android.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -123,10 +123,10 @@ LOCAL_SRC_FILES += \ core/java/android/nfc/ILlcpServiceSocket.aidl \ core/java/android/nfc/ILlcpServiceSocket.aidl \ core/java/android/nfc/ILlcpSocket.aidl \ core/java/android/nfc/ILlcpSocket.aidl \ core/java/android/nfc/INfcAdapter.aidl \ core/java/android/nfc/INfcAdapter.aidl \ core/java/android/nfc/INfcAdapterExtras.aidl \ core/java/android/nfc/INfcTag.aidl \ core/java/android/nfc/INfcTag.aidl \ core/java/android/nfc/IP2pInitiator.aidl \ core/java/android/nfc/IP2pInitiator.aidl \ core/java/android/nfc/IP2pTarget.aidl \ core/java/android/nfc/IP2pTarget.aidl \ core/java/android/nfc/INfcSecureElement.aidl \ core/java/android/os/IHardwareService.aidl \ core/java/android/os/IHardwareService.aidl \ core/java/android/os/IMessenger.aidl \ core/java/android/os/IMessenger.aidl \ core/java/android/os/INetworkManagementService.aidl \ core/java/android/os/INetworkManagementService.aidl \ Loading CleanSpec.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -95,7 +95,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ModelViewer_inte $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/PerfTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/PerfTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/RSTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/RSTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/hardware/IUsbManager.java) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/hardware/IUsbManager.java) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/nfc) # ************************************************ # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST Loading core/java/android/nfc/INfcAdapter.aidl +3 −8 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.nfc.ILlcpConnectionlessSocket; import android.nfc.INfcTag; import android.nfc.INfcTag; import android.nfc.IP2pTarget; import android.nfc.IP2pTarget; import android.nfc.IP2pInitiator; import android.nfc.IP2pInitiator; import android.nfc.INfcSecureElement; import android.nfc.INfcAdapterExtras; /** /** * @hide * @hide Loading @@ -41,13 +41,12 @@ interface INfcAdapter INfcTag getNfcTagInterface(); INfcTag getNfcTagInterface(); IP2pTarget getP2pTargetInterface(); IP2pTarget getP2pTargetInterface(); IP2pInitiator getP2pInitiatorInterface(); IP2pInitiator getP2pInitiatorInterface(); INfcSecureElement getNfcSecureElementInterface(); INfcAdapterExtras getNfcAdapterExtrasInterface(); // NfcAdapter-class related methods // NfcAdapter-class related methods boolean isEnabled(); boolean isEnabled(); NdefMessage localGet(); NdefMessage localGet(); void localSet(in NdefMessage message); void localSet(in NdefMessage message); void openTagConnection(in Tag tag); void enableForegroundDispatch(in ComponentName activity, in PendingIntent intent, void enableForegroundDispatch(in ComponentName activity, in PendingIntent intent, in IntentFilter[] filters, in TechListParcel techLists); in IntentFilter[] filters, in TechListParcel techLists); void disableForegroundDispatch(in ComponentName activity); void disableForegroundDispatch(in ComponentName activity); Loading @@ -59,12 +58,8 @@ interface INfcAdapter int createLlcpConnectionlessSocket(int sap); int createLlcpConnectionlessSocket(int sap); int createLlcpServiceSocket(int sap, String sn, int miu, int rw, int linearBufferLength); int createLlcpServiceSocket(int sap, String sn, int miu, int rw, int linearBufferLength); int createLlcpSocket(int sap, int miu, int rw, int linearBufferLength); int createLlcpSocket(int sap, int miu, int rw, int linearBufferLength); int deselectSecureElement(); boolean disable(); boolean disable(); boolean enable(); boolean enable(); String getProperties(String param); String getProperties(String param); int[] getSecureElementList(); int getSelectedSecureElement(); int selectSecureElement(int seId); int setProperties(String param, String value); int setProperties(String param, String value); } } core/java/android/nfc/INfcSecureElement.aidl→core/java/android/nfc/INfcAdapterExtras.aidl +10 −8 Original line number Original line Diff line number Diff line /* /* * Copyright (C) 2010 The Android Open Source Project * Copyright (C) 2011 The Android Open Source Project * * * Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License. Loading @@ -16,13 +16,15 @@ package android.nfc; package android.nfc; import android.os.Bundle; /** /** * {@hide} * {@hide} */ */ interface INfcSecureElement { interface INfcAdapterExtras { int openSecureElementConnection(); Bundle open(IBinder b); int closeSecureElementConnection(int nativeHandle); Bundle close(); byte[] exchangeAPDU(int nativeHandle, in byte[] data); Bundle transceive(in byte[] data_in); int[] getSecureElementTechList(int nativeHandle); int getCardEmulationRoute(); byte[] getSecureElementUid(int nativeHandle); void setCardEmulationRoute(int route); } } core/java/android/nfc/NfcAdapter.java +3 −62 Original line number Original line Diff line number Diff line Loading @@ -156,31 +156,6 @@ public final class NfcAdapter { */ */ public static final String EXTRA_ID = "android.nfc.extra.ID"; public static final String EXTRA_ID = "android.nfc.extra.ID"; /** * Broadcast Action: a transaction with a secure element has been detected. * <p> * Always contains the extra field * {@link android.nfc.NfcAdapter#EXTRA_AID} * @hide */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED"; /** * Broadcast Action: an RF field ON has been detected. * @hide */ public static final String ACTION_RF_FIELD_ON_DETECTED = "android.nfc.action.RF_FIELD_ON_DETECTED"; /** * Broadcast Action: an RF Field OFF has been detected. * @hide */ public static final String ACTION_RF_FIELD_OFF_DETECTED = "android.nfc.action.RF_FIELD_OFF_DETECTED"; /** /** * Broadcast Action: an adapter's state changed between enabled and disabled. * Broadcast Action: an adapter's state changed between enabled and disabled. * * Loading @@ -200,15 +175,6 @@ public final class NfcAdapter { */ */ public static final String EXTRA_NEW_BOOLEAN_STATE = "android.nfc.isEnabled"; public static final String EXTRA_NEW_BOOLEAN_STATE = "android.nfc.isEnabled"; /** * Mandatory byte array extra field in * {@link android.nfc.NfcAdapter#ACTION_TRANSACTION_DETECTED}. * <p> * Contains the AID of the applet involved in the transaction. * @hide */ public static final String EXTRA_AID = "android.nfc.extra.AID"; /** /** * LLCP link status: The LLCP link is activated. * LLCP link status: The LLCP link is activated. * @hide * @hide Loading Loading @@ -691,39 +657,14 @@ public final class NfcAdapter { } } /** /** * Create an Nfc Secure Element Connection * @hide * @hide */ */ public NfcSecureElement createNfcSecureElementConnection() { public INfcAdapterExtras getNfcAdapterExtrasInterface() { try { try { return new NfcSecureElement(sService.getNfcSecureElementInterface()); return sService.getNfcAdapterExtrasInterface(); } catch (RemoteException e) { } catch (RemoteException e) { Log.e(TAG, "createNfcSecureElementConnection failed", e); attemptDeadServiceRecovery(e); return null; return null; } } } } /** * To change the Secure Element Card Emulation state (ON/OFF) * @hide */ public void changeNfcSecureElementCardEmulationState(boolean state) { int seId = 11259375; if(state){ /* Enable card emulation */ try { sService.selectSecureElement(seId); } catch (RemoteException e) { Log.e(TAG, "Enable card emulation failed", e); } }else{ /* Disable card emulation */ try { sService.deselectSecureElement(); } catch (RemoteException e) { Log.e(TAG, " card emulation failed", e); } } } } } Loading
Android.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -123,10 +123,10 @@ LOCAL_SRC_FILES += \ core/java/android/nfc/ILlcpServiceSocket.aidl \ core/java/android/nfc/ILlcpServiceSocket.aidl \ core/java/android/nfc/ILlcpSocket.aidl \ core/java/android/nfc/ILlcpSocket.aidl \ core/java/android/nfc/INfcAdapter.aidl \ core/java/android/nfc/INfcAdapter.aidl \ core/java/android/nfc/INfcAdapterExtras.aidl \ core/java/android/nfc/INfcTag.aidl \ core/java/android/nfc/INfcTag.aidl \ core/java/android/nfc/IP2pInitiator.aidl \ core/java/android/nfc/IP2pInitiator.aidl \ core/java/android/nfc/IP2pTarget.aidl \ core/java/android/nfc/IP2pTarget.aidl \ core/java/android/nfc/INfcSecureElement.aidl \ core/java/android/os/IHardwareService.aidl \ core/java/android/os/IHardwareService.aidl \ core/java/android/os/IMessenger.aidl \ core/java/android/os/IMessenger.aidl \ core/java/android/os/INetworkManagementService.aidl \ core/java/android/os/INetworkManagementService.aidl \ Loading
CleanSpec.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -95,7 +95,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ModelViewer_inte $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/PerfTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/PerfTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/RSTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/RSTest_intermediates/) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/hardware/IUsbManager.java) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/hardware/IUsbManager.java) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/nfc) # ************************************************ # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST Loading
core/java/android/nfc/INfcAdapter.aidl +3 −8 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.nfc.ILlcpConnectionlessSocket; import android.nfc.INfcTag; import android.nfc.INfcTag; import android.nfc.IP2pTarget; import android.nfc.IP2pTarget; import android.nfc.IP2pInitiator; import android.nfc.IP2pInitiator; import android.nfc.INfcSecureElement; import android.nfc.INfcAdapterExtras; /** /** * @hide * @hide Loading @@ -41,13 +41,12 @@ interface INfcAdapter INfcTag getNfcTagInterface(); INfcTag getNfcTagInterface(); IP2pTarget getP2pTargetInterface(); IP2pTarget getP2pTargetInterface(); IP2pInitiator getP2pInitiatorInterface(); IP2pInitiator getP2pInitiatorInterface(); INfcSecureElement getNfcSecureElementInterface(); INfcAdapterExtras getNfcAdapterExtrasInterface(); // NfcAdapter-class related methods // NfcAdapter-class related methods boolean isEnabled(); boolean isEnabled(); NdefMessage localGet(); NdefMessage localGet(); void localSet(in NdefMessage message); void localSet(in NdefMessage message); void openTagConnection(in Tag tag); void enableForegroundDispatch(in ComponentName activity, in PendingIntent intent, void enableForegroundDispatch(in ComponentName activity, in PendingIntent intent, in IntentFilter[] filters, in TechListParcel techLists); in IntentFilter[] filters, in TechListParcel techLists); void disableForegroundDispatch(in ComponentName activity); void disableForegroundDispatch(in ComponentName activity); Loading @@ -59,12 +58,8 @@ interface INfcAdapter int createLlcpConnectionlessSocket(int sap); int createLlcpConnectionlessSocket(int sap); int createLlcpServiceSocket(int sap, String sn, int miu, int rw, int linearBufferLength); int createLlcpServiceSocket(int sap, String sn, int miu, int rw, int linearBufferLength); int createLlcpSocket(int sap, int miu, int rw, int linearBufferLength); int createLlcpSocket(int sap, int miu, int rw, int linearBufferLength); int deselectSecureElement(); boolean disable(); boolean disable(); boolean enable(); boolean enable(); String getProperties(String param); String getProperties(String param); int[] getSecureElementList(); int getSelectedSecureElement(); int selectSecureElement(int seId); int setProperties(String param, String value); int setProperties(String param, String value); } }
core/java/android/nfc/INfcSecureElement.aidl→core/java/android/nfc/INfcAdapterExtras.aidl +10 −8 Original line number Original line Diff line number Diff line /* /* * Copyright (C) 2010 The Android Open Source Project * Copyright (C) 2011 The Android Open Source Project * * * Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License. Loading @@ -16,13 +16,15 @@ package android.nfc; package android.nfc; import android.os.Bundle; /** /** * {@hide} * {@hide} */ */ interface INfcSecureElement { interface INfcAdapterExtras { int openSecureElementConnection(); Bundle open(IBinder b); int closeSecureElementConnection(int nativeHandle); Bundle close(); byte[] exchangeAPDU(int nativeHandle, in byte[] data); Bundle transceive(in byte[] data_in); int[] getSecureElementTechList(int nativeHandle); int getCardEmulationRoute(); byte[] getSecureElementUid(int nativeHandle); void setCardEmulationRoute(int route); } }
core/java/android/nfc/NfcAdapter.java +3 −62 Original line number Original line Diff line number Diff line Loading @@ -156,31 +156,6 @@ public final class NfcAdapter { */ */ public static final String EXTRA_ID = "android.nfc.extra.ID"; public static final String EXTRA_ID = "android.nfc.extra.ID"; /** * Broadcast Action: a transaction with a secure element has been detected. * <p> * Always contains the extra field * {@link android.nfc.NfcAdapter#EXTRA_AID} * @hide */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED"; /** * Broadcast Action: an RF field ON has been detected. * @hide */ public static final String ACTION_RF_FIELD_ON_DETECTED = "android.nfc.action.RF_FIELD_ON_DETECTED"; /** * Broadcast Action: an RF Field OFF has been detected. * @hide */ public static final String ACTION_RF_FIELD_OFF_DETECTED = "android.nfc.action.RF_FIELD_OFF_DETECTED"; /** /** * Broadcast Action: an adapter's state changed between enabled and disabled. * Broadcast Action: an adapter's state changed between enabled and disabled. * * Loading @@ -200,15 +175,6 @@ public final class NfcAdapter { */ */ public static final String EXTRA_NEW_BOOLEAN_STATE = "android.nfc.isEnabled"; public static final String EXTRA_NEW_BOOLEAN_STATE = "android.nfc.isEnabled"; /** * Mandatory byte array extra field in * {@link android.nfc.NfcAdapter#ACTION_TRANSACTION_DETECTED}. * <p> * Contains the AID of the applet involved in the transaction. * @hide */ public static final String EXTRA_AID = "android.nfc.extra.AID"; /** /** * LLCP link status: The LLCP link is activated. * LLCP link status: The LLCP link is activated. * @hide * @hide Loading Loading @@ -691,39 +657,14 @@ public final class NfcAdapter { } } /** /** * Create an Nfc Secure Element Connection * @hide * @hide */ */ public NfcSecureElement createNfcSecureElementConnection() { public INfcAdapterExtras getNfcAdapterExtrasInterface() { try { try { return new NfcSecureElement(sService.getNfcSecureElementInterface()); return sService.getNfcAdapterExtrasInterface(); } catch (RemoteException e) { } catch (RemoteException e) { Log.e(TAG, "createNfcSecureElementConnection failed", e); attemptDeadServiceRecovery(e); return null; return null; } } } } /** * To change the Secure Element Card Emulation state (ON/OFF) * @hide */ public void changeNfcSecureElementCardEmulationState(boolean state) { int seId = 11259375; if(state){ /* Enable card emulation */ try { sService.selectSecureElement(seId); } catch (RemoteException e) { Log.e(TAG, "Enable card emulation failed", e); } }else{ /* Disable card emulation */ try { sService.deselectSecureElement(); } catch (RemoteException e) { Log.e(TAG, " card emulation failed", e); } } } } }