summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-03-30 15:31:20 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-30 15:31:20 -0700
commit3322eb8bf21f95ec1564dff145d16e34e12ddfd5 (patch)
tree5be1c20788af5a30705e8d647a4ffc5ab022f214 /src
parent4f5627f090c497cc6f628120a5b182891da73f5d (diff)
parentcd7f018ec0cff0fcdcfe1399aa2398b809f2e35e (diff)
downloadpackages_apps_nfc-3322eb8bf21f95ec1564dff145d16e34e12ddfd5.zip
packages_apps_nfc-3322eb8bf21f95ec1564dff145d16e34e12ddfd5.tar.gz
packages_apps_nfc-3322eb8bf21f95ec1564dff145d16e34e12ddfd5.tar.bz2
Merge "Let connect() fail with an I/O exception if tag has left the field."
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/nfc/NfcService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index af46566..c3f27a9 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -853,6 +853,10 @@ public class NfcService extends Application implements DeviceHostListener {
return ErrorCodes.ERROR_DISCONNECT;
}
+ if (!tag.isPresent()) {
+ return ErrorCodes.ERROR_DISCONNECT;
+ }
+
if (technology == TagTechnology.NFC_B) {
return ErrorCodes.ERROR_NOT_SUPPORTED;
}