diff options
author | Martijn Coenen <maco@google.com> | 2013-03-11 10:01:56 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2013-03-11 10:01:56 -0700 |
commit | c29a673675223e538bd85a891004cafec6f1188e (patch) | |
tree | 93bc350cf32ec91a92255a43b901de8cbc1ac434 | |
parent | ec8c79f7ef07cc5e882df1a548f6ee4b33c58e54 (diff) | |
download | android_packages_apps_Nfc-c29a673675223e538bd85a891004cafec6f1188e.tar.gz android_packages_apps_Nfc-c29a673675223e538bd85a891004cafec6f1188e.tar.bz2 android_packages_apps_Nfc-c29a673675223e538bd85a891004cafec6f1188e.zip |
Disable UICC_IDLE feature when host is talking to SE.
To prevent loosing selection and any other state when
the host is talking to the SE.
Bug: 7487151
Change-Id: I05ceac561bac057f2d9a04afb0d1646c22a24a27
-rwxr-xr-x | nci/jni/SecureElement.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nci/jni/SecureElement.cpp b/nci/jni/SecureElement.cpp index 3c2c2b09..298d2524 100755 --- a/nci/jni/SecureElement.cpp +++ b/nci/jni/SecureElement.cpp @@ -687,6 +687,13 @@ bool SecureElement::connectEE () // Disable RF discovery completely while the DH is connected android::startRfDiscovery(false); + // Disable SE low-power mode while the DH is connected + UINT8 disable_uicc_idle[] = { 0x60,0x00,0x82,0x04,0x40,0x4B,0x4C,0x00 }; + nfaStat = NFA_SetConfig(0xC2, sizeof(disable_uicc_idle), &disable_uicc_idle[0]); + if (nfaStat != NFA_STATUS_OK) { + ALOGE("%s: Could not disable UICC idle timeout feature", fn); + return false; + } mNewSourceGate = 0; if (gGatePipe == -1) @@ -868,6 +875,12 @@ bool SecureElement::disconnectEE (jint seID) ALOGE ("%s: fail dealloc gate; error=0x%X", fn, nfaStat); } mIsPiping = false; + // Re-enable UICC low-power mode + UINT8 enable_uicc_idle[] = { 0x61,0x00,0x82,0x04,0x40,0x4B,0x4C,0x00 }; + nfaStat = NFA_SetConfig(0xC2, sizeof(enable_uicc_idle), &enable_uicc_idle[0]); + if (nfaStat != NFA_STATUS_OK) { + ALOGE("%s: Could not enable UICC idle timeout feature", fn); + } // Re-enable RF discovery // Note that it only effactuates the current configuration, // so if polling/listening were configured OFF (forex because |