summaryrefslogtreecommitdiffstats
path: root/core/java/android/nfc/NfcAdapter.java
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2010-10-17 19:05:47 -0700
committerNick Pelly <npelly@google.com>2010-10-18 10:04:40 -0700
commite47150e933e6f610546f57183477f324566e521e (patch)
tree5a415c5b9fdae883bf4dc507c516dd52ce20db67 /core/java/android/nfc/NfcAdapter.java
parentd1f7f4a68375f879671d300510f23d3ee78a500e (diff)
downloadframeworks_base-e47150e933e6f610546f57183477f324566e521e.zip
frameworks_base-e47150e933e6f610546f57183477f324566e521e.tar.gz
frameworks_base-e47150e933e6f610546f57183477f324566e521e.tar.bz2
Fix up NFC permissions.
The initial (vendor) implementation had 4 perms, replace with 1. Requires no permissions: - Viewing UID, type of discovered tags and cards. - Viewing the NDEF message contents of NDEF formatted tags and cards. Requires android.permission.NFC - Get/Set the local tag "MyTag" - Creating or using a RawTagConnection (transceive()) - Creating or using a NdefTagConnection (write()/read()) Change-Id: I1b585c7d91738bed6261277061a48cf7c939482a Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'core/java/android/nfc/NfcAdapter.java')
-rw-r--r--core/java/android/nfc/NfcAdapter.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java
index fb079f4..6f718d3 100644
--- a/core/java/android/nfc/NfcAdapter.java
+++ b/core/java/android/nfc/NfcAdapter.java
@@ -22,7 +22,6 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.Log;
-//TODO(npelly) permission {@link android.Manifest.permission#NFC_MODIFY}
/**
* Represents the device's local NFC adapter.
* <p>
@@ -35,7 +34,7 @@ import android.util.Log;
* to NFC Tags.
* <p class="note">
* <strong>Note:</strong> Some methods require the
- * TODO permission.
+ * {@link android.Manifest.permission#NFC} permission.
*/
public final class NfcAdapter {
/**
@@ -231,8 +230,7 @@ public final class NfcAdapter {
* <li>provide the NDEF message on over LLCP to peer NFC adapters
* </ul>
* The NDEF message is preserved across reboot.
- * <p>
- * Requires NFC_WRITE permission
+ * <p>Requires {@link android.Manifest.permission#NFC} permission.
*
* @param message NDEF message to make public
*/
@@ -246,8 +244,7 @@ public final class NfcAdapter {
/**
* Get the NDEF Message that this adapter appears as to Tag readers.
- * <p>
- * Requires NFC_WRITE permission
+ * <p>Requires {@link android.Manifest.permission#NFC} permission.
*
* @return NDEF Message that is publicly readable
*/
@@ -262,6 +259,7 @@ public final class NfcAdapter {
/**
* Create a raw tag connection to the default Target
+ * <p>Requires {@link android.Manifest.permission#NFC} permission.
*/
public RawTagConnection createRawTagConnection(Tag tag) {
try {
@@ -274,6 +272,7 @@ public final class NfcAdapter {
/**
* Create a raw tag connection to the specified Target
+ * <p>Requires {@link android.Manifest.permission#NFC} permission.
*/
public RawTagConnection createRawTagConnection(Tag tag, String target) {
try {
@@ -286,6 +285,7 @@ public final class NfcAdapter {
/**
* Create an NDEF tag connection to the default Target
+ * <p>Requires {@link android.Manifest.permission#NFC} permission.
*/
public NdefTagConnection createNdefTagConnection(NdefTag tag) {
try {
@@ -298,6 +298,7 @@ public final class NfcAdapter {
/**
* Create an NDEF tag connection to the specified Target
+ * <p>Requires {@link android.Manifest.permission#NFC} permission.
*/
public NdefTagConnection createNdefTagConnection(NdefTag tag, String target) {
try {