Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd945eca authored by chloedai's avatar chloedai Committed by Chloe Dai
Browse files

Add the details of throwing SecurityException to the annotations

SecurityException: if the tag object is reused after the tag has left the field

Bug: 272864002
Test: build pass
Change-Id: I1b74392e603642326bd8fa6996472c34ce27840c
parent ec59bee3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 {
+2 −0
Original line number Diff line number Diff line
@@ -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 {
+2 −0
Original line number Diff line number Diff line
@@ -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 {
+4 −0
Original line number Diff line number Diff line
@@ -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();
+1 −0
Original line number Diff line number Diff line
@@ -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);
Loading