summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike J. Chen <mjchen@google.com>2012-02-07 17:16:30 -0800
committerMike J. Chen <mjchen@google.com>2012-02-07 17:31:18 -0800
commit582cf5a7407e9f96715ea2edb82c108d7fadfcb6 (patch)
tree0fe721191cef8f7efe54261ef8f1f0ee5a323eb4
parent644d92af6d20f9926f1f69d8320ea91271dee00b (diff)
downloadexternal_libnfc-nxp-582cf5a7407e9f96715ea2edb82c108d7fadfcb6.zip
external_libnfc-nxp-582cf5a7407e9f96715ea2edb82c108d7fadfcb6.tar.gz
external_libnfc-nxp-582cf5a7407e9f96715ea2edb82c108d7fadfcb6.tar.bz2
DO NOT MERGE
Disable NXP_SMX (secure element) in libnfc-nxp for Phantasm Phantasm uses a PN544, which has no secure element. libnfc-nxp is configured to assume a secure element currently and doesn't handle runtime detection properly. The result is that on first boot, when the NfcService tries to wipe the secure element, it hangs as it tries to open a connection to the non-existing secure element. Changing the define to NXP_SMX=0 makes the library report no secure element, and the wipe operation fails (like it should) when it tries to do the wipe. This fixes Bug: 5964890 Will file a separate bug to have the library and Nfc.apk do better at runtime detection of the secure element. This shouldn't go back to master since it's a target specific change. Change-Id: Id6e57b7f5a88e96a59b9cdc6f67ac966fa964356 Signed-off-by: Mike J. Chen <mjchen@google.com>
-rw-r--r--Android.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index b45f78b..41568e4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -106,6 +106,11 @@ LOCAL_SRC_FILES += Linux_x86/phDal4Nfc_messageQueueLib.c
LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DNFC_TIMER_CONTEXT -fno-strict-aliasing
+ifneq (,$(findstring $(TARGET_DEVICE),phantasm))
+# phantasm has no secure element
+LOCAL_CFLAGS += -DNXP_SMX=0
+endif
+
# Uncomment for Chipset command/responses
# Or use "setprop debug.nfc.LOW_LEVEL_TRACES" at run-time
# LOCAL_CFLAGS += -DLOW_LEVEL_TRACES