commit | e259ad280f539aa807ed7627d85099554885d546 | [log] [tgz] |
---|---|---|
author | Amith Yamasani <yamasani@google.com> | Mon Apr 24 11:30:19 2017 -0700 |
committer | Amith Yamasani <yamasani@google.com> | Mon Apr 24 11:30:19 2017 -0700 |
tree | 3111a5ce23d3fb88d6172702aba4c069b9723525 | |
parent | 41bf42a1c73d762856d5a38d7548cf751ae8bd15 [diff] [blame] |
Check bluetooth app id instead of uid Fixes the crash on user switches. Change-Id: If0c003011bd014b437ef5c8bee24a27b68be88d9 Fixes: 37617840 Test: manual - add a user
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java index 64ab848..0db1b5d 100644 --- a/services/core/java/com/android/server/media/MediaSessionService.java +++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -965,7 +965,7 @@ 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"); }