Merge "Add the details of throwing SecurityException to the annotations" am: f0d3410c44
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2489476 Change-Id: I16ace3b1c756ed5dc82b220a5d6c166761547e91 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -88,6 +88,7 @@ public final class IsoDep extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @param timeout timeout value in milliseconds
|
* @param timeout timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void setTimeout(int timeout) {
|
public void setTimeout(int timeout) {
|
||||||
try {
|
try {
|
||||||
@@ -106,6 +107,7 @@ public final class IsoDep extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @return timeout value in milliseconds
|
* @return timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public int getTimeout() {
|
public int getTimeout() {
|
||||||
try {
|
try {
|
||||||
@@ -167,6 +169,7 @@ public final class IsoDep extends BasicTagTechnology {
|
|||||||
* @return response bytes received, will not be null
|
* @return response bytes received, will not be null
|
||||||
* @throws TagLostException if the tag leaves the field
|
* @throws TagLostException if the tag leaves the field
|
||||||
* @throws IOException if there is an I/O failure, or this operation is canceled
|
* @throws IOException if there is an I/O failure, or this operation is canceled
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public byte[] transceive(byte[] data) throws IOException {
|
public byte[] transceive(byte[] data) throws IOException {
|
||||||
return transceive(data, true);
|
return transceive(data, true);
|
||||||
@@ -193,6 +196,7 @@ public final class IsoDep extends BasicTagTechnology {
|
|||||||
* support.
|
* support.
|
||||||
*
|
*
|
||||||
* @return whether the NFC adapter on this device supports extended length APDUs.
|
* @return whether the NFC adapter on this device supports extended length APDUs.
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public boolean isExtendedLengthApduSupported() {
|
public boolean isExtendedLengthApduSupported() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -597,6 +597,7 @@ public final class MifareClassic extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @param timeout timeout value in milliseconds
|
* @param timeout timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void setTimeout(int timeout) {
|
public void setTimeout(int timeout) {
|
||||||
try {
|
try {
|
||||||
@@ -615,6 +616,7 @@ public final class MifareClassic extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @return timeout value in milliseconds
|
* @return timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public int getTimeout() {
|
public int getTimeout() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ public final class MifareUltralight extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @param timeout timeout value in milliseconds
|
* @param timeout timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void setTimeout(int timeout) {
|
public void setTimeout(int timeout) {
|
||||||
try {
|
try {
|
||||||
@@ -255,6 +256,7 @@ public final class MifareUltralight extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @return timeout value in milliseconds
|
* @return timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public int getTimeout() {
|
public int getTimeout() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -261,6 +261,7 @@ public final class Ndef extends BasicTagTechnology {
|
|||||||
* @throws TagLostException if the tag leaves the field
|
* @throws TagLostException if the tag leaves the field
|
||||||
* @throws IOException if there is an I/O failure, or the operation is canceled
|
* @throws IOException if there is an I/O failure, or the operation is canceled
|
||||||
* @throws FormatException if the NDEF Message on the tag is malformed
|
* @throws FormatException if the NDEF Message on the tag is malformed
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public NdefMessage getNdefMessage() throws IOException, FormatException {
|
public NdefMessage getNdefMessage() throws IOException, FormatException {
|
||||||
checkConnected();
|
checkConnected();
|
||||||
@@ -301,6 +302,7 @@ public final class Ndef extends BasicTagTechnology {
|
|||||||
* @throws TagLostException if the tag leaves the field
|
* @throws TagLostException if the tag leaves the field
|
||||||
* @throws IOException if there is an I/O failure, or the operation is canceled
|
* @throws IOException if there is an I/O failure, or the operation is canceled
|
||||||
* @throws FormatException if the NDEF Message to write is malformed
|
* @throws FormatException if the NDEF Message to write is malformed
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void writeNdefMessage(NdefMessage msg) throws IOException, FormatException {
|
public void writeNdefMessage(NdefMessage msg) throws IOException, FormatException {
|
||||||
checkConnected();
|
checkConnected();
|
||||||
@@ -339,6 +341,7 @@ public final class Ndef extends BasicTagTechnology {
|
|||||||
* <p>Does not cause any RF activity and does not block.
|
* <p>Does not cause any RF activity and does not block.
|
||||||
*
|
*
|
||||||
* @return true if it is possible to make this tag read-only
|
* @return true if it is possible to make this tag read-only
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public boolean canMakeReadOnly() {
|
public boolean canMakeReadOnly() {
|
||||||
INfcTag tagService = mTag.getTagService();
|
INfcTag tagService = mTag.getTagService();
|
||||||
@@ -370,6 +373,7 @@ public final class Ndef extends BasicTagTechnology {
|
|||||||
* @return true on success, false if it is not possible to make this tag read-only
|
* @return true on success, false if it is not possible to make this tag read-only
|
||||||
* @throws TagLostException if the tag leaves the field
|
* @throws TagLostException if the tag leaves the field
|
||||||
* @throws IOException if there is an I/O failure, or the operation is canceled
|
* @throws IOException if there is an I/O failure, or the operation is canceled
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public boolean makeReadOnly() throws IOException {
|
public boolean makeReadOnly() throws IOException {
|
||||||
checkConnected();
|
checkConnected();
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ public final class NdefFormatable extends BasicTagTechnology {
|
|||||||
* @throws TagLostException if the tag leaves the field
|
* @throws TagLostException if the tag leaves the field
|
||||||
* @throws IOException if there is an I/O failure, or the operation is canceled
|
* @throws IOException if there is an I/O failure, or the operation is canceled
|
||||||
* @throws FormatException if the NDEF Message to write is malformed
|
* @throws FormatException if the NDEF Message to write is malformed
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void formatReadOnly(NdefMessage firstMessage) throws IOException, FormatException {
|
public void formatReadOnly(NdefMessage firstMessage) throws IOException, FormatException {
|
||||||
format(firstMessage, true);
|
format(firstMessage, true);
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ public final class NfcA extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @param timeout timeout value in milliseconds
|
* @param timeout timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void setTimeout(int timeout) {
|
public void setTimeout(int timeout) {
|
||||||
try {
|
try {
|
||||||
@@ -159,6 +160,7 @@ public final class NfcA extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @return timeout value in milliseconds
|
* @return timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public int getTimeout() {
|
public int getTimeout() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ public final class NfcF extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @param timeout timeout value in milliseconds
|
* @param timeout timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void setTimeout(int timeout) {
|
public void setTimeout(int timeout) {
|
||||||
try {
|
try {
|
||||||
@@ -163,6 +164,7 @@ public final class NfcF extends BasicTagTechnology {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @return timeout value in milliseconds
|
* @return timeout value in milliseconds
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public int getTimeout() {
|
public int getTimeout() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ public interface TagTechnology extends Closeable {
|
|||||||
* @see #close()
|
* @see #close()
|
||||||
* @throws TagLostException if the tag leaves the field
|
* @throws TagLostException if the tag leaves the field
|
||||||
* @throws IOException if there is an I/O failure, or connect is canceled
|
* @throws IOException if there is an I/O failure, or connect is canceled
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void connect() throws IOException;
|
public void connect() throws IOException;
|
||||||
|
|
||||||
@@ -193,6 +194,7 @@ public interface TagTechnology extends Closeable {
|
|||||||
* @see #close()
|
* @see #close()
|
||||||
* @throws TagLostException if the tag leaves the field
|
* @throws TagLostException if the tag leaves the field
|
||||||
* @throws IOException if there is an I/O failure, or connect is canceled
|
* @throws IOException if there is an I/O failure, or connect is canceled
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public void reconnect() throws IOException;
|
public void reconnect() throws IOException;
|
||||||
@@ -205,6 +207,7 @@ public interface TagTechnology extends Closeable {
|
|||||||
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
|
||||||
*
|
*
|
||||||
* @see #connect()
|
* @see #connect()
|
||||||
|
* @throws SecurityException if the tag object is reused after the tag has left the field
|
||||||
*/
|
*/
|
||||||
public void close() throws IOException;
|
public void close() throws IOException;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user