#include <cutils/fs.h>
#include <cutils/multiuser.h>
#include <cutils/sched_policy.h>
+#include <private/android_filesystem_config.h>
#include <utils/String8.h>
#include <selinux/android.h>
#include <processgroup/processgroup.h>
jint debug_flags, jobjectArray rlimits,
jint mount_external, jstring se_info, jstring se_name,
jintArray fdsToClose) {
+ // Grant CAP_WAKE_ALARM to the Bluetooth process.
+ jlong capabilities = 0;
+ if (uid == AID_BLUETOOTH) {
+ capabilities |= (1LL << CAP_WAKE_ALARM);
+ }
+
return ForkAndSpecializeCommon(env, uid, gid, gids, debug_flags,
- rlimits, 0, 0, mount_external, se_info, se_name, false, fdsToClose);
+ rlimits, capabilities, capabilities, mount_external, se_info,
+ se_name, false, fdsToClose);
}
static jint com_android_internal_os_Zygote_nativeForkSystemServer(