diff --git a/common/dynamic/flipendo.te b/common/dynamic/flipendo.te index b3df802..b16032d 100644 --- a/common/dynamic/flipendo.te +++ b/common/dynamic/flipendo.te @@ -23,6 +23,3 @@ allow flipendo fwk_stats_hwservice:hwservice_manager find; # Allow flipendo to find color_display_service allow flipendo color_display_service:service_manager find; - -# Allow flipendo to find hal_power_service -hal_client_domain(flipendo, hal_power); diff --git a/common/dynamic/turbo_adapter.te b/common/dynamic/turbo_adapter.te index b2f0202..d6128cf 100644 --- a/common/dynamic/turbo_adapter.te +++ b/common/dynamic/turbo_adapter.te @@ -8,6 +8,3 @@ app_domain(turbo_adapter) # To use ServiceManager allow turbo_adapter app_api_service:service_manager find; - -# To find and call hal_power_default so turbo can obtain the service extension (IPowerExt) -hal_client_domain(turbo_adapter, hal_power) diff --git a/common/dynamic_extra/flipendo.te b/common/dynamic_extra/flipendo.te new file mode 100644 index 0000000..b467886 --- /dev/null +++ b/common/dynamic_extra/flipendo.te @@ -0,0 +1,2 @@ +# Access to PowerHal service +hal_client_domain(flipendo, hal_power); diff --git a/common/dynamic_extra/turbo_adapter.te b/common/dynamic_extra/turbo_adapter.te new file mode 100644 index 0000000..035aca2 --- /dev/null +++ b/common/dynamic_extra/turbo_adapter.te @@ -0,0 +1,2 @@ +# To find and call hal_power_default so turbo can obtain the service extension (IPowerExt) +hal_client_domain(turbo_adapter, hal_power) diff --git a/common/sepolicy.mk b/common/sepolicy.mk index 561d341..a1e6087 100644 --- a/common/sepolicy.mk +++ b/common/sepolicy.mk @@ -25,9 +25,15 @@ ifeq ($(TARGET_USES_PREBUILT_VENDOR_SEPOLICY), true) SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += \ device/lineage/sepolicy/common/dynamic \ device/lineage/sepolicy/common/system + +ifneq ($(TARGET_HAL_POWER_RW_INPUT_DEVICE), true) +SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += \ + device/lineage/sepolicy/common/dynamic_extra +endif else BOARD_VENDOR_SEPOLICY_DIRS += \ device/lineage/sepolicy/common/dynamic \ + device/lineage/sepolicy/common/dynamic_extra \ device/lineage/sepolicy/common/vendor endif