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:
Chloe Dai
2023-03-20 14:10:58 +00:00
committed by Automerger Merge Worker
8 changed files with 20 additions and 0 deletions

View File

@@ -88,6 +88,7 @@ public final class IsoDep extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @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) {
try {
@@ -106,6 +107,7 @@ public final class IsoDep extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @return timeout value in milliseconds
* @throws SecurityException if the tag object is reused after the tag has left the field
*/
public int getTimeout() {
try {
@@ -167,6 +169,7 @@ public final class IsoDep extends BasicTagTechnology {
* @return response bytes received, will not be null
* @throws TagLostException if the tag leaves the field
* @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 {
return transceive(data, true);
@@ -193,6 +196,7 @@ public final class IsoDep extends BasicTagTechnology {
* support.
*
* @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() {
try {

View File

@@ -597,6 +597,7 @@ public final class MifareClassic extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @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) {
try {
@@ -615,6 +616,7 @@ public final class MifareClassic extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @return timeout value in milliseconds
* @throws SecurityException if the tag object is reused after the tag has left the field
*/
public int getTimeout() {
try {

View File

@@ -236,6 +236,7 @@ public final class MifareUltralight extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @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) {
try {
@@ -255,6 +256,7 @@ public final class MifareUltralight extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @return timeout value in milliseconds
* @throws SecurityException if the tag object is reused after the tag has left the field
*/
public int getTimeout() {
try {

View File

@@ -261,6 +261,7 @@ public final class Ndef extends BasicTagTechnology {
* @throws TagLostException if the tag leaves the field
* @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 SecurityException if the tag object is reused after the tag has left the field
*/
public NdefMessage getNdefMessage() throws IOException, FormatException {
checkConnected();
@@ -301,6 +302,7 @@ public final class Ndef extends BasicTagTechnology {
* @throws TagLostException if the tag leaves the field
* @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 SecurityException if the tag object is reused after the tag has left the field
*/
public void writeNdefMessage(NdefMessage msg) throws IOException, FormatException {
checkConnected();
@@ -339,6 +341,7 @@ public final class Ndef extends BasicTagTechnology {
* <p>Does not cause any RF activity and does not block.
*
* @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() {
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
* @throws TagLostException if the tag leaves the field
* @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 {
checkConnected();

View File

@@ -111,6 +111,7 @@ public final class NdefFormatable extends BasicTagTechnology {
* @throws TagLostException if the tag leaves the field
* @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 SecurityException if the tag object is reused after the tag has left the field
*/
public void formatReadOnly(NdefMessage firstMessage) throws IOException, FormatException {
format(firstMessage, true);

View File

@@ -141,6 +141,7 @@ public final class NfcA extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @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) {
try {
@@ -159,6 +160,7 @@ public final class NfcA extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @return timeout value in milliseconds
* @throws SecurityException if the tag object is reused after the tag has left the field
*/
public int getTimeout() {
try {

View File

@@ -145,6 +145,7 @@ public final class NfcF extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @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) {
try {
@@ -163,6 +164,7 @@ public final class NfcF extends BasicTagTechnology {
* <p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
*
* @return timeout value in milliseconds
* @throws SecurityException if the tag object is reused after the tag has left the field
*/
public int getTimeout() {
try {

View File

@@ -176,6 +176,7 @@ public interface TagTechnology extends Closeable {
* @see #close()
* @throws TagLostException if the tag leaves the field
* @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;
@@ -193,6 +194,7 @@ public interface TagTechnology extends Closeable {
* @see #close()
* @throws TagLostException if the tag leaves the field
* @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
*/
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.
*
* @see #connect()
* @throws SecurityException if the tag object is reused after the tag has left the field
*/
public void close() throws IOException;