From bea8a99c916742fa153cabb82777ad0ccbb8a3c3 Mon Sep 17 00:00:00 2001
From: Sharvil Nanavati <sharvil@google.com>
Date: Mon, 31 Aug 2015 23:28:15 -0700
Subject: [PATCH] DO NOT MERGE Grant Bluetooth the ability to acquire wake
 locks.

Bug: 23375670
Change-Id: I0454c580b465a2f0edc928cf0effb71733866f03
---
 bluetooth.te | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bluetooth.te b/bluetooth.te
index a79023dc2..338f2b214 100644
--- a/bluetooth.te
+++ b/bluetooth.te
@@ -3,6 +3,8 @@ type bluetooth, domain;
 app_domain(bluetooth)
 net_domain(bluetooth)
 
+wakelock_use(bluetooth);
+
 # Data file accesses.
 allow bluetooth bluetooth_data_file:dir create_dir_perms;
 allow bluetooth bluetooth_data_file:notdevfile_class_set create_file_perms;
@@ -70,4 +72,4 @@ allow bluetooth shell_data_file:file read;
 # Superuser capabilities.
 # bluetooth requires net_admin and wake_alarm.
 neverallow bluetooth self:capability ~net_admin;
-neverallow bluetooth self:capability2 ~wake_alarm;
+neverallow bluetooth self:capability2 ~{ wake_alarm block_suspend };
-- 
GitLab