diff options
author | Martijn Coenen <maco@google.com> | 2012-03-30 09:43:46 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-30 09:43:46 -0700 |
commit | 4f5627f090c497cc6f628120a5b182891da73f5d (patch) | |
tree | 7b37ef0308b18577d998af285442405c47d32184 /src/com | |
parent | 020b17588c85e9a55539ccbb20081754272c724b (diff) | |
parent | 182152b054d555fc4ac5d5c2cd2367cb8c205782 (diff) | |
download | packages_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-x | src/com/android/nfc/NfcService.java | 26 |
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); } } |