diff options
author | Martijn Coenen <maco@google.com> | 2012-07-25 15:07:43 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-07-27 18:33:54 -0700 |
commit | c981340b7157e1b1873ca741f37b1ff19edae0b8 (patch) | |
tree | 7a2d34db60e0ac35e458b7f7f146b6291969a7fa /nxp | |
parent | 7a1d2adf875d414625853b3a5360663e420a3769 (diff) | |
download | packages_apps_nfc-c981340b7157e1b1873ca741f37b1ff19edae0b8.zip packages_apps_nfc-c981340b7157e1b1873ca741f37b1ff19edae0b8.tar.gz packages_apps_nfc-c981340b7157e1b1873ca741f37b1ff19edae0b8.tar.bz2 |
NFC: Initial NCI DeviceHost and JNI implementation.
From partner drop at 07/20. Modified to fit into our new
JNI/DH split.
New build config that builds two targets,
Nfc and NfcNci, each with their own dependencies. Product config files
have to specify either Nfc or NfcNci in their packages config.
Change-Id: I348a3aad7167195ca03baf9636408ab8e4c55fce
Diffstat (limited to 'nxp')
-rwxr-xr-x | nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java b/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java index f969627..14544d2 100755 --- a/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java +++ b/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java @@ -43,6 +43,20 @@ public class NativeNfcManager implements DeviceHost { private static final String PREF_FIRMWARE_MODTIME = "firmware_modtime"; private static final long FIRMWARE_MODTIME_DEFAULT = -1; + //TODO: dont hardcode this + private static final byte[][] EE_WIPE_APDUS = { + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x07, (byte)0xa0, (byte)0x00, + (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x20, (byte)0x10, (byte)0x00}, + {(byte)0x80, (byte)0xe2, (byte)0x01, (byte)0x03, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x07, (byte)0xa0, (byte)0x00, + (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x30, (byte)0x30, (byte)0x00}, + {(byte)0x80, (byte)0xb4, (byte)0x00, (byte)0x00, (byte)0x00}, + {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00}, + }; + + static { System.loadLibrary("nfc_jni"); } @@ -310,6 +324,14 @@ public class NativeNfcManager implements DeviceHost { return false; } + public boolean enablePN544Quirks() { + return true; + } + + public byte[][] getWipeApdus() { + return EE_WIPE_APDUS; + } + private native String doDump(); @Override public String dump() { |