am d350dc04: Merge "API: Make close() throw an IOException." into gingerbread

* commit 'd350dc0492fab3614749955f5dcf21ec1c522b24':
  API: Make close() throw an IOException.
This commit is contained in:
Nick Pelly
2011-01-27 16:26:28 -08:00
committed by Android Git Automerger
4 changed files with 11 additions and 4 deletions

View File

@@ -103127,6 +103127,8 @@
deprecated="not deprecated" deprecated="not deprecated"
visibility="public" visibility="public"
> >
<exception name="IOException" type="java.io.IOException">
</exception>
</method> </method>
<method name="connect" <method name="connect"
return="void" return="void"
@@ -104225,6 +104227,8 @@
deprecated="not deprecated" deprecated="not deprecated"
visibility="public" visibility="public"
> >
<implements name="java.io.Closeable">
</implements>
<method name="close" <method name="close"
return="void" return="void"
abstract="true" abstract="true"
@@ -104235,6 +104239,8 @@
deprecated="not deprecated" deprecated="not deprecated"
visibility="public" visibility="public"
> >
<exception name="IOException" type="java.io.IOException">
</exception>
</method> </method>
<method name="connect" <method name="connect"
return="void" return="void"

View File

@@ -117,7 +117,7 @@ import java.io.IOException;
} }
@Override @Override
public void close() { public void close() throws IOException {
try { try {
/* Note that we don't want to physically disconnect the tag, /* Note that we don't want to physically disconnect the tag,
* but just reconnect to it to reset its state * but just reconnect to it to reset its state

View File

@@ -92,7 +92,7 @@ public final class IsoDep extends BasicTagTechnology {
} }
@Override @Override
public void close() { public void close() throws IOException {
try { try {
mTag.getTagService().resetIsoDepTimeout(); mTag.getTagService().resetIsoDepTimeout();
} catch (RemoteException e) { } catch (RemoteException e) {

View File

@@ -18,9 +18,10 @@ package android.nfc.tech;
import android.nfc.Tag; import android.nfc.Tag;
import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
public interface TagTechnology { public interface TagTechnology extends Closeable {
/** /**
* This technology is an instance of {@link NfcA}. * This technology is an instance of {@link NfcA}.
* <p>Support for this technology type is mandatory. * <p>Support for this technology type is mandatory.
@@ -135,5 +136,5 @@ public interface TagTechnology {
* @see #connect() * @see #connect()
* @see #reconnect() * @see #reconnect()
*/ */
public void close(); public void close() throws IOException;
} }