Allow the Bluetooth HAL to toggle rfkill
Bug: 35657600
Test: user build of Marlin starts with BT
Change-Id: Ic2380da66467b9b1c385da7d7fa10fddf4c7fae1
diff --git a/private/hal_bluetooth_default.te b/private/hal_bluetooth_default.te
index 4fcb322..d22015b 100644
--- a/private/hal_bluetooth_default.te
+++ b/private/hal_bluetooth_default.te
@@ -4,11 +4,6 @@
type hal_bluetooth_default_exec, exec_type, file_type;
init_daemon_domain(hal_bluetooth_default)
-# VTS tests need to be able to toggle rfkill
-userdebug_or_eng(`
- allow hal_bluetooth_default self:capability net_admin;
-')
-
# Logging for backward compatibility
allow hal_bluetooth_default bluetooth_data_file:dir ra_dir_perms;
allow hal_bluetooth_default bluetooth_data_file:file create_file_perms;
diff --git a/public/hal_bluetooth.te b/public/hal_bluetooth.te
index 207f718..e9679de 100644
--- a/public/hal_bluetooth.te
+++ b/public/hal_bluetooth.te
@@ -4,6 +4,9 @@
wakelock_use(hal_bluetooth);
+# The HAL toggles rfkill to power the chip off/on.
+allow hal_bluetooth self:capability net_admin;
+
# bluetooth factory file accesses.
r_dir_file(hal_bluetooth, bluetooth_efs_file)