DO NOT MERGE Check caller for sending media key to global priority session am: c282c4f106 am: 868d586c98
am: ff1c1993b7
Change-Id: I60355987ea0814314c2f79041d068e099b158c7b
This commit is contained in:
@@ -47,6 +47,7 @@ import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
import android.os.PowerManager;
|
||||
import android.os.Process;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ResultReceiver;
|
||||
import android.os.ServiceManager;
|
||||
@@ -760,6 +761,13 @@ public class MediaSessionService extends SystemService implements Monitor {
|
||||
+ "setup is in progress.");
|
||||
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) {
|
||||
// If we don't have a media button receiver to fall back on
|
||||
|
||||
Reference in New Issue
Block a user