diff options
author | Martijn Coenen <maco@google.com> | 2011-10-19 10:31:48 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-19 10:31:48 -0700 |
commit | 9a8cbd141eb21bf00b0a489c4487314add510b70 (patch) | |
tree | 4ed1f1f5b71ffbc7ebbae45892fe41a72320b926 | |
parent | 0bca9a1c482d8f66dba0262e436fd24291e4fc35 (diff) | |
parent | 7bbabb2deebbc498c635f690c5283201da549247 (diff) | |
download | packages_apps_nfc-9a8cbd141eb21bf00b0a489c4487314add510b70.zip packages_apps_nfc-9a8cbd141eb21bf00b0a489c4487314add510b70.tar.gz packages_apps_nfc-9a8cbd141eb21bf00b0a489c4487314add510b70.tar.bz2 |
am 7bbabb2d: Fix crash when turning screen off and NFC is off.
* commit '7bbabb2deebbc498c635f690c5283201da549247':
Fix crash when turning screen off and NFC is off.
-rwxr-xr-x | src/com/android/nfc/NfcService.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java index 2ad957e..1b56648 100755 --- a/src/com/android/nfc/NfcService.java +++ b/src/com/android/nfc/NfcService.java @@ -1633,14 +1633,12 @@ public class NfcService extends Application implements DeviceHostListener { * manipulation code is overwriting globals it relies on. This hack should * be removed when the LLCP stack is fixed. */ - Log.d(TAG, "NFC-C polling OFF"); - mDeviceHost.disableDiscovery(); - maybeDisconnectTarget(); - if (mOpenEe == null) { + if (isNfcEnabled() && mOpenEe == null) { + Log.d(TAG, "NFC-C polling OFF"); + mDeviceHost.disableDiscovery(); + maybeDisconnectTarget(); Log.d(TAG, "NFC-EE routing OFF"); mDeviceHost.doDeselectSecureElement(); - } else { - Log.d(TAG, "Skipping request for NFC-EE routing OFF"); } } else { if (DBG) Log.d(TAG, "Ignoring disable request"); |