DO NOT MERGE Check caller for sending media key to global priority session am: 6a1567c267
am: 709d112eca
Change-Id: Ic112856078e6b3c0bd4e6e2442457c3be035a253
This commit is contained in:
@@ -48,6 +48,7 @@ import android.os.Handler;
|
|||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
|
import android.os.Process;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ResultReceiver;
|
import android.os.ResultReceiver;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
@@ -728,6 +729,13 @@ public class MediaSessionService extends SystemService implements Monitor {
|
|||||||
+ "setup is in progress.");
|
+ "setup is in progress.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (isGlobalPriorityActive() && uid != Process.SYSTEM_UID) {
|
||||||
|
// Prevent dispatching key event through reflection while the global priority
|
||||||
|
// session is active.
|
||||||
|
Slog.i(TAG, "Only the system can dispatch media key event "
|
||||||
|
+ "to the global priority session.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
// If we don't have a media button receiver to fall back on
|
// If we don't have a media button receiver to fall back on
|
||||||
|
|||||||
Reference in New Issue
Block a user