Bug 1076739 - Allow AID_BLUETOOTH to grant the permission of MODIFY_AUDIO_SETTINGS. r=tzimmermann
authorKai-Zhen Li <kli@mozilla.com>
Thu, 02 Oct 2014 17:27:35 +0800
changeset 209332 62babb0d3ae28b5b4c8f9b4269d3aad6c8004d09
parent 209283 60c38a8155cedfdd4b74fb38c478d9b9f8d05eee
child 209333 1da35b1d566319922decfbdd9d5ab6e18469ad5e
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerstzimmermann
bugs1076739
milestone35.0a1
Bug 1076739 - Allow AID_BLUETOOTH to grant the permission of MODIFY_AUDIO_SETTINGS. r=tzimmermann
widget/gonk/GonkPermission.cpp
--- a/widget/gonk/GonkPermission.cpp
+++ b/widget/gonk/GonkPermission.cpp
@@ -115,17 +115,17 @@ GonkPermissionService::checkPermission(c
   // root can do anything.
   if (0 == uid) {
     return true;
   }
 
   String8 perm8(permission);
 
   // Some ril implementations need android.permission.MODIFY_AUDIO_SETTINGS
-  if (uid == AID_RADIO &&
+  if ((uid == AID_RADIO || uid == AID_BLUETOOTH) &&
       perm8 == "android.permission.MODIFY_AUDIO_SETTINGS") {
     return true;
   }
 
   // No other permissions apply to non-app processes.
   if (uid < AID_APP) {
     ALOGE("%s for pid=%d,uid=%d denied: not an app",
       String8(permission).string(), pid, uid);