From ce3c183c9b8f3e36ba841d15b91d855854552321 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Mon, 22 Oct 2012 17:22:04 -0700 Subject: Reset RF field status on SE activation. We've seen the NFCC get in a state where it continuously reports field off/field on events. The danger is that the device goes to sleep right after a field on event. On wake-up, the field off/field on loop is gone, and the device prevents any access to the SE from the DH because it thinks the field is still present. Bug: 7386840 Change-Id: I87b681124078fe69c0244efd7b14ebe3ffd1c161 --- nci/jni/SecureElement.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nci/jni/SecureElement.cpp b/nci/jni/SecureElement.cpp index 6c52030..3c9256b 100755 --- a/nci/jni/SecureElement.cpp +++ b/nci/jni/SecureElement.cpp @@ -486,6 +486,11 @@ bool SecureElement::activate (jint seID) if (mActiveSeOverride) override_se = NFA_HANDLE_GROUP_EE | mActiveSeOverride; + if (mRfFieldIsOn) { + ALOGE("%s: RF field indication still on, resetting", fn); + mRfFieldIsOn = false; + } + ALOGD ("%s: override seid=0x%X", fn, override_se ); //activate every discovered secure element for (int index=0; index < mActualNumEe; index++) -- cgit v1.1