summaryrefslogtreecommitdiffstats
path: root/core/java/android/nfc/tech/BasicTagTechnology.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/nfc/tech/BasicTagTechnology.java')
-rw-r--r--core/java/android/nfc/tech/BasicTagTechnology.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/java/android/nfc/tech/BasicTagTechnology.java b/core/java/android/nfc/tech/BasicTagTechnology.java
index bcb7199..913ae0e 100644
--- a/core/java/android/nfc/tech/BasicTagTechnology.java
+++ b/core/java/android/nfc/tech/BasicTagTechnology.java
@@ -129,6 +129,15 @@ import java.io.IOException;
}
}
+ /** Internal getMaxTransceiveLength() */
+ int getMaxTransceiveLengthInternal() {
+ try {
+ return mTag.getTagService().getMaxTransceiveLength(mSelectedTechnology);
+ } catch (RemoteException e) {
+ Log.e(TAG, "NFC service dead", e);
+ return 0;
+ }
+ }
/** Internal transceive */
/*package*/ byte[] transceive(byte[] data, boolean raw) throws IOException {
checkConnected();
@@ -139,16 +148,7 @@ import java.io.IOException;
if (result == null) {
throw new IOException("transceive failed");
} else {
- if (result.isSuccessful()) {
- return result.getResponseData();
- } else {
- if (result.isTagLost()) {
- throw new TagLostException("Tag was lost.");
- }
- else {
- throw new IOException("transceive failed");
- }
- }
+ return result.getResponseOrThrow();
}
} catch (RemoteException e) {
Log.e(TAG, "NFC service dead", e);