Merge "Check bluetooth app id instead of uid" into oc-dev

am: 094996a2b3

Change-Id: I21b9c07bef34974601abd27045481bc45cf882b5
This commit is contained in:
Amith Yamasani
2017-04-24 19:35:08 +00:00
committed by android-build-merger

View File

@@ -965,7 +965,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");
}