summaryrefslogtreecommitdiffstats
path: root/src/com/android/nfc/NfcService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/nfc/NfcService.java')
-rwxr-xr-xsrc/com/android/nfc/NfcService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index a5aa89a6..8411fb61 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -962,8 +962,9 @@ public class NfcService implements DeviceHostListener {
@Override
public void setReaderMode(IBinder binder, IAppCallback callback, int flags, Bundle extras)
throws RemoteException {
- if (!mForegroundUtils.isInForeground(Binder.getCallingUid())) {
- Log.e(TAG, "setReaderMode: Caller not in foreground.");
+ int callingUid = Binder.getCallingUid();
+ if (callingUid != Process.SYSTEM_UID && !mForegroundUtils.isInForeground(callingUid)) {
+ Log.e(TAG, "setReaderMode: Caller is not in foreground and is not system process.");
return;
}
synchronized (NfcService.this) {