Merge "Check Bluetooth app id instead of uid"

am: 7d4a354fd5

Change-Id: Ib79ace5311606520ae84c4ba37ffc64a538428d6
This commit is contained in:
Amith Yamasani
2017-04-24 23:36:58 +00:00
committed by android-build-merger

View File

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