Merge "Check Bluetooth app id instead of uid" am: 7d4a354fd5
am: 0efa055590
Change-Id: Ibed5b8045215e0d4dd4e20aa2778ec5a16c715e2
This commit is contained in:
@@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user