summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-03-30 09:43:46 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-30 09:43:46 -0700
commit4f5627f090c497cc6f628120a5b182891da73f5d (patch)
tree7b37ef0308b18577d998af285442405c47d32184 /src/com
parent020b17588c85e9a55539ccbb20081754272c724b (diff)
parent182152b054d555fc4ac5d5c2cd2367cb8c205782 (diff)
downloadpackages_apps_nfc-4f5627f090c497cc6f628120a5b182891da73f5d.zip
packages_apps_nfc-4f5627f090c497cc6f628120a5b182891da73f5d.tar.gz
packages_apps_nfc-4f5627f090c497cc6f628120a5b182891da73f5d.tar.bz2
Merge "Remove permissions check from the TagService."
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/android/nfc/NfcService.java26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index 660126c..af46566 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -775,7 +775,6 @@ public class NfcService extends Application implements DeviceHostListener {
@Override
public INfcTag getNfcTagInterface() throws RemoteException {
- mContext.enforceCallingOrSelfPermission(NFC_PERM, NFC_PERM_ERROR);
return mNfcTagService;
}
@@ -909,25 +908,6 @@ public class NfcService extends Application implements DeviceHostListener {
}
@Override
- public byte[] getUid(int nativeHandle) throws RemoteException {
- TagEndpoint tag = null;
- byte[] uid;
-
- // Check if NFC is enabled
- if (!isNfcEnabled()) {
- return null;
- }
-
- /* find the tag in the hmap */
- tag = (TagEndpoint) findObject(nativeHandle);
- if (tag != null) {
- uid = tag.getUid();
- return uid;
- }
- return null;
- }
-
- @Override
public boolean isPresent(int nativeHandle) throws RemoteException {
TagEndpoint tag = null;
@@ -947,6 +927,8 @@ public class NfcService extends Application implements DeviceHostListener {
@Override
public boolean isNdef(int nativeHandle) throws RemoteException {
+ mContext.enforceCallingOrSelfPermission(NFC_PERM, NFC_PERM_ERROR);
+
TagEndpoint tag = null;
// Check if NFC is enabled
@@ -1167,15 +1149,11 @@ public class NfcService extends Application implements DeviceHostListener {
@Override
public boolean canMakeReadOnly(int ndefType) throws RemoteException {
- mContext.enforceCallingOrSelfPermission(NFC_PERM, NFC_PERM_ERROR);
-
return mDeviceHost.canMakeReadOnly(ndefType);
}
@Override
public int getMaxTransceiveLength(int tech) throws RemoteException {
- mContext.enforceCallingOrSelfPermission(NFC_PERM, NFC_PERM_ERROR);
-
return mDeviceHost.getMaxTransceiveLength(tech);
}
}