summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-05-21 12:43:26 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-21 12:43:26 -0700
commit4e7293861f218e617c17d5af02ae9c797fc4a48c (patch)
tree891175bf538b8f9a0d6b2ff9e187a9e1de015ce6 /src
parent5bc9a1d4952980dce4ebd4ceb42ecae8f1c6660b (diff)
parente769540a26900bb809c210c976eaca3ac6cf2605 (diff)
downloadandroid_packages_apps_Nfc-4e7293861f218e617c17d5af02ae9c797fc4a48c.tar.gz
android_packages_apps_Nfc-4e7293861f218e617c17d5af02ae9c797fc4a48c.tar.bz2
android_packages_apps_Nfc-4e7293861f218e617c17d5af02ae9c797fc4a48c.zip
am e769540a: am 1179ee22: Merge "Close NFCEE when NFC is being shut down." into jb-dev
* commit 'e769540a26900bb809c210c976eaca3ac6cf2605': Close NFCEE when NFC is being shut down.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/nfc/NfcService.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index 9e4e21b6..7b3c4561 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -554,6 +554,14 @@ public class NfcService extends Application implements DeviceHostListener {
mP2pLinkManager.enableDisable(false, false);
+ synchronized (NfcService.this) {
+ if (mOpenEe != null) {
+ try {
+ _nfcEeClose(-1, mOpenEe.binder);
+ } catch (IOException e) { }
+ }
+ }
+
// Stop watchdog if tag present
// A convenient way to stop the watchdog properly consists of
// disconnecting the tag. The polling loop shall be stopped before
@@ -1178,7 +1186,7 @@ public class NfcService extends Application implements DeviceHostListener {
// operations. However this is not supported by current hardware.
synchronized (NfcService.this) {
- if (!isNfcEnabled()) {
+ if (!isNfcEnabledOrShuttingDown()) {
throw new IOException("NFC adapter is disabled");
}
if (mOpenEe == null) {