diff options
Diffstat (limited to 'src/com/android/nfc')
-rwxr-xr-x | src/com/android/nfc/NfcService.java | 5 |
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) { |