diff options
author | Nick Pelly <npelly@google.com> | 2011-06-12 21:36:46 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2011-06-12 22:04:07 -0700 |
commit | 2edb3ee5e28ab719a3bb17b8d76b2b588405be9a (patch) | |
tree | c05e22c9913cac1211507daed4e555209f012a2c /jni/com_android_nfc_NativeNfcManager.cpp | |
parent | dfac80d25dd2816ad5af74cc4131b74134cc81b7 (diff) | |
download | packages_apps_nfc-2edb3ee5e28ab719a3bb17b8d76b2b588405be9a.zip packages_apps_nfc-2edb3ee5e28ab719a3bb17b8d76b2b588405be9a.tar.gz packages_apps_nfc-2edb3ee5e28ab719a3bb17b8d76b2b588405be9a.tar.bz2 |
Fix NFC service wake-lock, again.
1) Put a watchdog on the NFC Service disable path.
All the bug-reports show we were stuck in _disable(), watch-dog
this path (10 seconds).
2) Only attempt a SE reset once, even if it fails the first time.
All the bugs reports should the _disable() was due to SE reset
on first boot.
3) Grab the NFC service lock before the wake-lock.
So even if someone has NFC service lock, at least we don't
hold a wake-lock waiting for it.
Bug: 4581084
Change-Id: Ic9829dddde8d0c67cf0e8e4912357fa2902faa11
Diffstat (limited to 'jni/com_android_nfc_NativeNfcManager.cpp')
-rw-r--r-- | jni/com_android_nfc_NativeNfcManager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/jni/com_android_nfc_NativeNfcManager.cpp b/jni/com_android_nfc_NativeNfcManager.cpp index 8df3a19..cba4691 100644 --- a/jni/com_android_nfc_NativeNfcManager.cpp +++ b/jni/com_android_nfc_NativeNfcManager.cpp @@ -2378,6 +2378,12 @@ static void com_android_nfc_NfcManager_doSetProperties(JNIEnv *e, jobject o, jin } + +static void com_android_nfc_NfcManager_doAbort(JNIEnv *e, jobject o) +{ + emergency_recovery(NULL); +} + /* * JNI registration. */ @@ -2433,6 +2439,9 @@ static JNINativeMethod gMethods[] = {"doResetIsoDepTimeout", "()V", (void *)com_android_nfc_NfcManager_doResetIsoDepTimeout}, + + {"doAbort", "()V", + (void *)com_android_nfc_NfcManager_doAbort}, }; |