Skip to content

Commit be372d6

Browse files
committed
Make the new NFC APIs public.
Change-Id: Ia0acd9759d67683eaf1dc199dc2cc55e16a98e77
1 parent b5a8654 commit be372d6

File tree

13 files changed

+1458
-28
lines changed

13 files changed

+1458
-28
lines changed

api/current.xml

Lines changed: 1433 additions & 0 deletions
Large diffs are not rendered by default.

core/java/android/nfc/NfcAdapter.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public final class NfcAdapter {
4343
*
4444
* If any activities respond to this intent neither
4545
* {@link #ACTION_TECHNOLOGY_DISCOVERED} or {@link #ACTION_TAG_DISCOVERED} will be started.
46-
* @hide
4746
*/
4847
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
4948
public static final String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED";
@@ -57,7 +56,6 @@ public final class NfcAdapter {
5756
* {@link #ACTION_TAG_DISCOVERED}
5857
*
5958
* If any activities respond to this intent {@link #ACTION_TAG_DISCOVERED} will not be started.
60-
* @hide
6159
*/
6260
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
6361
public static final String ACTION_TECHNOLOGY_DISCOVERED = "android.nfc.action.TECH_DISCOVERED";
@@ -76,7 +74,6 @@ public final class NfcAdapter {
7674

7775
/**
7876
* Mandatory Tag extra for the ACTION_TAG intents.
79-
* @hide
8077
*/
8178
public static final String EXTRA_TAG = "android.nfc.extra.TAG";
8279

core/java/android/nfc/Tag.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* in {@link NfcAdapter#ACTION_TAG_DISCOVERED} intents. A {@link Tag} object is immutable
4646
* and represents the state of the tag at the time of discovery. It can be
4747
* directly queried for its UID and Type, or used to create a {@link TagTechnology}
48-
* (with {@link Tag#getTechnology(int)}).
48+
* (with {@link Tag#getTechnology}).
4949
* <p>
5050
* A {@link Tag} can be used to create a {@link TagTechnology} only while the tag is in
5151
* range. If it is removed and then returned to range, then the most recent
@@ -55,7 +55,6 @@
5555
* time and calls on this class will retrieve those read-only properties, and
5656
* not cause any further RF activity or block. Note however that arrays passed to and
5757
* returned by this class are *not* cloned, so be careful not to modify them.
58-
* @hide
5958
*/
6059
public class Tag implements Parcelable {
6160
/*package*/ final byte[] mId;
@@ -249,7 +248,9 @@ public Tag[] newArray(int size) {
249248
}
250249
};
251250

252-
/*
251+
/**
252+
* For internal use only.
253+
*
253254
* @hide
254255
*/
255256
public synchronized void setConnectedTechnology(int technology) {
@@ -260,14 +261,18 @@ public synchronized void setConnectedTechnology(int technology) {
260261
}
261262
}
262263

263-
/*
264+
/**
265+
* For internal use only.
266+
*
264267
* @hide
265268
*/
266269
public int getConnectedTechnology() {
267270
return mConnectedTechnology;
268271
}
269272

270-
/*
273+
/**
274+
* For internal use only.
275+
*
271276
* @hide
272277
*/
273278
public void setTechnologyDisconnected() {

core/java/android/nfc/technology/IsoDep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* A low-level connection to a {@link Tag} using the ISO-DEP technology, also known as
2828
* ISO1443-4.
2929
*
30-
* <p>You can acquire this kind of connection with {@link Tag#getTechnology(int)}.
30+
* <p>You can acquire this kind of connection with {@link Tag#getTechnology}.
3131
* Use this class to send and receive data with {@link #transceive transceive()}.
3232
*
3333
* <p>Applications must implement their own protocol stack on top of

core/java/android/nfc/technology/MifareClassic.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
/**
2727
* Concrete class for TagTechnology.MIFARE_CLASSIC
2828
*
29-
* Mifare classic has n sectors, with varying sizes, although
30-
* they are at least the same pattern for any one mifare classic
29+
* MIFARE Classic has n sectors, with varying sizes, although
30+
* they are at least the same pattern for any one MIFARE Classic
3131
* product. Each sector has two keys. Authentication with the correct
3232
* key is needed before access to any sector.
3333
*
3434
* Each sector has k blocks.
35-
* Block size is constant across the whole mifare classic family.
35+
* Block size is constant across the whole MIFARE classic family.
3636
*/
3737
public final class MifareClassic extends BasicTagTechnology {
3838
/**
@@ -43,12 +43,12 @@ public final class MifareClassic extends BasicTagTechnology {
4343
public static final byte[] KEY_DEFAULT =
4444
{(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF};
4545
/**
46-
* The well-known, default Mifare Application Directory read key.
46+
* The well-known, default MIFARE Application Directory read key.
4747
*/
4848
public static final byte[] KEY_MIFARE_APPLICATION_DIRECTORY =
4949
{(byte)0xA0,(byte)0xA1,(byte)0xA2,(byte)0xA3,(byte)0xA4,(byte)0xA5};
5050
/**
51-
* The well-known, default read key for NDEF data on a Mifare Classic
51+
* The well-known, default read key for NDEF data on a MIFARE Classic
5252
*/
5353
public static final byte[] KEY_NFC_FORUM =
5454
{(byte)0xD3,(byte)0xF7,(byte)0xD3,(byte)0xF7,(byte)0xD3,(byte)0xF7};

core/java/android/nfc/technology/MifareUltralight.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
/**
2727
* Concrete class for TagTechnology.MIFARE_ULTRALIGHT
2828
*
29-
* Mifare classic has n sectors, with varying sizes, although
30-
* they are at least the same pattern for any one mifare classic
29+
* MIFARE Ultralight has n sectors, with varying sizes, although
30+
* they are at least the same pattern for any one MIFARE Ultralight
3131
* product. Each sector has two keys. Authentication with the correct
3232
* key is needed before access to any sector.
3333
*
3434
* Each sector has k blocks.
35-
* Block size is constant across the whole mifare classic family.
35+
* Block size is constant across the whole MIFARE Ultralight family.
3636
*/
3737
public final class MifareUltralight extends BasicTagTechnology {
3838
public static final int TYPE_ULTRALIGHT = 1;

core/java/android/nfc/technology/Ndef.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* to interact with NDEF data. MiFare Classic cards that present NDEF data may also be used
3232
* via this class. To determine the exact technology being used call {@link #getTechnologyId()}
3333
*
34-
* <p>You can acquire this kind of connection with {@link Tag#getTechnology(int)}.
34+
* <p>You can acquire this kind of connection with {@link Tag#getTechnology}.
3535
*
3636
* <p class="note"><strong>Note:</strong>
3737
* Use of this class requires the {@link android.Manifest.permission#NFC}

core/java/android/nfc/technology/NdefFormatable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* An interface to a {@link Tag} allowing to format the tag as NDEF.
3131
*
32-
* <p>You can acquire this kind of interface with {@link Tag#getTechnology(int)}.
32+
* <p>You can acquire this kind of interface with {@link Tag#getTechnology}.
3333
*
3434
* <p class="note"><strong>Note:</strong>
3535
* Use of this class requires the {@link android.Manifest.permission#NFC}

core/java/android/nfc/technology/NfcA.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* A low-level connection to a {@link Tag} using the NFC-A technology, also known as
2626
* ISO1443-3A.
2727
*
28-
* <p>You can acquire this kind of connection with {@link Tag#getTechnology(int)}.
28+
* <p>You can acquire this kind of connection with {@link Tag#getTechnology}.
2929
* Use this class to send and receive data with {@link #transceive transceive()}.
3030
*
3131
* <p>Applications must implement their own protocol stack on top of

core/java/android/nfc/technology/NfcB.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* A low-level connection to a {@link Tag} using the NFC-B technology, also known as
2626
* ISO1443-3B.
2727
*
28-
* <p>You can acquire this kind of connection with {@link Tag#getTechnology(int)}.
28+
* <p>You can acquire this kind of connection with {@link Tag#getTechnology}.
2929
* Use this class to send and receive data with {@link #transceive transceive()}.
3030
*
3131
* <p>Applications must implement their own protocol stack on top of

0 commit comments

Comments
 (0)