summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartijn Coenen <martijn.coenen@nxp.com>2010-12-06 21:05:17 -0800
committerJeff Hamilton <jham@android.com>2010-12-07 13:51:47 -0800
commit72df4ea8300ad345eb256cf43d8dae35eef39ba2 (patch)
tree391c0e3379846dd43233eb8565f1d4e3a05a3cc8
parent47e6ccb65ab0088cf04809c234cdb5f747579c8c (diff)
downloadframeworks_base-72df4ea8300ad345eb256cf43d8dae35eef39ba2.zip
frameworks_base-72df4ea8300ad345eb256cf43d8dae35eef39ba2.tar.gz
frameworks_base-72df4ea8300ad345eb256cf43d8dae35eef39ba2.tar.bz2
Remove Type X Tags from the top-level API.
Also added an extra to carry the ndef message, so we can have it in multiple Ndef instances without doing an active read. Change-Id: I2ecabc24732990c5c9979ee3a001a7fb13da21d9
-rw-r--r--core/java/android/nfc/Tag.java6
-rw-r--r--core/java/android/nfc/technology/Ndef.java3
-rw-r--r--core/java/android/nfc/technology/TagTechnology.java17
3 files changed, 5 insertions, 21 deletions
diff --git a/core/java/android/nfc/Tag.java b/core/java/android/nfc/Tag.java
index ad05496..2f6b3a5 100644
--- a/core/java/android/nfc/Tag.java
+++ b/core/java/android/nfc/Tag.java
@@ -154,11 +154,7 @@ public class Tag implements Parcelable {
case TagTechnology.NFC_V: {
return new NfcV(adapter, this, extras);
}
- case TagTechnology.MIFARE_CLASSIC_NDEF:
- case TagTechnology.TYPE_1:
- case TagTechnology.TYPE_2:
- case TagTechnology.TYPE_3:
- case TagTechnology.TYPE_4: {
+ case TagTechnology.NDEF: {
return new Ndef(adapter, this, tech, extras);
}
case TagTechnology.NFC_F: {
diff --git a/core/java/android/nfc/technology/Ndef.java b/core/java/android/nfc/technology/Ndef.java
index 22460cf..1e3da2a 100644
--- a/core/java/android/nfc/technology/Ndef.java
+++ b/core/java/android/nfc/technology/Ndef.java
@@ -44,6 +44,9 @@ public final class Ndef extends BasicTagTechnology {
public static final int NDEF_MODE_WRITE_MANY = 4;
public static final int NDEF_MODE_UNKNOWN = 5;
+ /** @hide */
+ public static final String EXTRA_NDEF_MSG = "ndefmsg";
+
/**
* Internal constructor, to be used by NfcAdapter
* @hide
diff --git a/core/java/android/nfc/technology/TagTechnology.java b/core/java/android/nfc/technology/TagTechnology.java
index 9dfb297..4704f2b 100644
--- a/core/java/android/nfc/technology/TagTechnology.java
+++ b/core/java/android/nfc/technology/TagTechnology.java
@@ -49,22 +49,7 @@ public interface TagTechnology {
/**
* This object is an instance of {@link Ndef}
*/
- public static final int TYPE_1 = 101;
-
- /**
- * This object is an instance of {@link Ndef}
- */
- public static final int TYPE_2 = 102;
-
- /**
- * This object is an instance of {@link Ndef}
- */
- public static final int TYPE_3 = 103;
-
- /**
- * This object is an instance of {@link Ndef}
- */
- public static final int TYPE_4 = 104;
+ public static final int NDEF = 101;
/**
* This object is an instance of {@link NdefFormatable}