summaryrefslogtreecommitdiffstats
path: root/core/java/android/nfc/tech
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2011-06-06 12:32:07 +0200
committerMartijn Coenen <maco@google.com>2011-06-06 12:43:05 +0200
commitea51a4275ab7353d537ff94d97e6294e49b50cab (patch)
tree9492d8d96c3e3c8a5b639aafb5dc09b400fefd62 /core/java/android/nfc/tech
parent40f4efe712b375cf0421f4651abbc703595d9d47 (diff)
downloadframeworks_base-ea51a4275ab7353d537ff94d97e6294e49b50cab.zip
frameworks_base-ea51a4275ab7353d537ff94d97e6294e49b50cab.tar.gz
frameworks_base-ea51a4275ab7353d537ff94d97e6294e49b50cab.tar.bz2
Connecting to a NFC technology may fail.
NotSupportedOperationException will be thrown in these cases, unchecked for now. Bug: 4195403 Change-Id: I48f4f277d43afba8bc505ae2a6c216cc387b1e97
Diffstat (limited to 'core/java/android/nfc/tech')
-rw-r--r--core/java/android/nfc/tech/BasicTagTechnology.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/nfc/tech/BasicTagTechnology.java b/core/java/android/nfc/tech/BasicTagTechnology.java
index 7ec807a..6557ee0 100644
--- a/core/java/android/nfc/tech/BasicTagTechnology.java
+++ b/core/java/android/nfc/tech/BasicTagTechnology.java
@@ -77,6 +77,10 @@ import java.io.IOException;
// Store this in the tag object
mTag.setConnectedTechnology(mSelectedTechnology);
mIsConnected = true;
+ } else if (errorCode == ErrorCodes.ERROR_NOT_SUPPORTED) {
+ throw new UnsupportedOperationException("Connecting to " +
+ "this technology is not supported by the NFC " +
+ "adapter.");
} else {
throw new IOException();
}