Commit e1bc9bb0 authored by Martijn Coenen's avatar Martijn Coenen Committed by The Android Automerger
Browse files

Allow system_server access to NFC reader mode API.

Bug: 29451566
Change-Id: I26b0a2e9b33854efd59b95ab230a6db3042f93c7
parent 9ea802b5
......@@ -938,8 +938,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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment