Merge "Check Bluetooth app id instead of uid"

This commit is contained in:
Treehugger Robot
2017-04-24 23:30:51 +00:00
committed by Gerrit Code Review

View File

@@ -866,7 +866,7 @@ public class MediaSessionService extends SystemService implements Monitor {
final int uid = Binder.getCallingUid();
final long token = Binder.clearCallingIdentity();
try {
if (uid != Process.BLUETOOTH_UID) {
if (!UserHandle.isSameApp(uid, Process.BLUETOOTH_UID)) {
throw new SecurityException("Only Bluetooth service processes can set"
+ " Callback");
}