IOException on close() can be useful to indicate that in-progress transactions
were canceled.
I also audited all of our tech classes to make sure every function that needs
to throw IOException does so.
Change-Id: Iaa9c43d79d59ff85772d5c3e4b4d57a6fa8df4cf
deprecated="not deprecated"
visibility="public"
>
+<exception name="IOException" type="java.io.IOException">
+</exception>
</method>
<method name="connect"
return="void"
deprecated="not deprecated"
visibility="public"
>
+<implements name="java.io.Closeable">
+</implements>
<method name="close"
return="void"
abstract="true"
deprecated="not deprecated"
visibility="public"
>
+<exception name="IOException" type="java.io.IOException">
+</exception>
</method>
<method name="connect"
return="void"
}
@Override
- public void close() {
+ public void close() throws IOException {
try {
/* Note that we don't want to physically disconnect the tag,
* but just reconnect to it to reset its state
}
@Override
- public void close() {
+ public void close() throws IOException {
try {
mTag.getTagService().resetIsoDepTimeout();
} catch (RemoteException e) {
import android.nfc.Tag;
+import java.io.Closeable;
import java.io.IOException;
-public interface TagTechnology {
+public interface TagTechnology extends Closeable {
/**
* This technology is an instance of {@link NfcA}.
* <p>Support for this technology type is mandatory.
* @see #connect()
* @see #reconnect()
*/
- public void close();
+ public void close() throws IOException;
}