Merge branch 'lineage-21.0' of https://github.com/LineageOS/android_device_lineage_sepolicy into leaf-3.2
Change-Id: I670e3fe71ab9012b8bb671310af723c58d183bee
diff --git a/common/sepolicy.mk b/common/sepolicy.mk
index 1a55071..9a1620d 100644
--- a/common/sepolicy.mk
+++ b/common/sepolicy.mk
@@ -25,9 +25,6 @@
device/lineage/sepolicy/common/vendor
endif
-# Selectively include legacy rules defined by the products
--include device/lineage/sepolicy/legacy-common/sepolicy.mk
-
# Include atv rules on atv product
ifeq ($(PRODUCT_IS_ATV), true)
include device/lineage/sepolicy/atv/sepolicy.mk
diff --git a/common/vendor/file_contexts b/common/vendor/file_contexts
index a16c5c4..01a98b4 100644
--- a/common/vendor/file_contexts
+++ b/common/vendor/file_contexts
@@ -13,6 +13,9 @@
# Power HAL
/(vendor|system/vendor)/bin/hw/android\.hardware\.power-service\.lineage-libperfmgr u:object_r:hal_power_default_exec:s0
+# Radio HAL
+/(vendor|system/vendor)/bin/hw/android\.hardware\.radio@1\.4-service\.legacy u:object_r:hal_radio_default_exec:s0
+
# RadioConfig HAL
/(vendor|system/vendor)/bin/hw/android\.hardware\.radio\.config@1\.1-service\.wrapper u:object_r:hal_radio_config_default_exec:s0
diff --git a/common/vendor/hal_radio_default.te b/common/vendor/hal_radio_default.te
new file mode 100644
index 0000000..e2320be
--- /dev/null
+++ b/common/vendor/hal_radio_default.te
@@ -0,0 +1 @@
+allow hal_radio_default hal_lineage_backend_radio_hwservice:hwservice_manager find;
diff --git a/common/vendor/hwservice.te b/common/vendor/hwservice.te
index 791f7f4..9d4693b 100644
--- a/common/vendor/hwservice.te
+++ b/common/vendor/hwservice.te
@@ -1 +1,3 @@
+type hal_lineage_backend_radio_hwservice, hwservice_manager_type;
+
type hal_lineage_backend_radio_config_hwservice, hwservice_manager_type;
diff --git a/common/vendor/hwservice_contexts b/common/vendor/hwservice_contexts
index 492a808..c0d4bf6 100644
--- a/common/vendor/hwservice_contexts
+++ b/common/vendor/hwservice_contexts
@@ -1,2 +1,3 @@
# The following hwservices are supposed to be registered by blobs through hexedit; Keep string length the same.
+lineage.hardware.radio::IRadio u:object_r:hal_lineage_backend_radio_hwservice:s0
lineage.hardware.radio.config::IRadioConfig u:object_r:hal_lineage_backend_radio_config_hwservice:s0
diff --git a/common/vendor/rild.te b/common/vendor/rild.te
index 50e5b8d..cc177f2 100644
--- a/common/vendor/rild.te
+++ b/common/vendor/rild.te
@@ -1 +1,2 @@
+add_hwservice(rild, hal_lineage_backend_radio_hwservice)
add_hwservice(rild, hal_lineage_backend_radio_config_hwservice)