From 582cf5a7407e9f96715ea2edb82c108d7fadfcb6 Mon Sep 17 00:00:00 2001 From: "Mike J. Chen" Date: Tue, 7 Feb 2012 17:16:30 -0800 Subject: 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 --- Android.mk | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.1