sm8350-common: sepolicy: Add camera perf and postproc hwservice

Change-Id: I5e054952a9739c1363294564296a26adcf3c8d8a
This commit is contained in:
Arian 2023-03-24 14:45:31 +01:00
parent b201a744cb
commit 08a574b256
5 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,12 @@
# Camera
attribute vendor_hal_cameraperf;
attribute vendor_hal_cameraperf_client;
attribute vendor_hal_cameraperf_server;
attribute vendor_hal_camerapostproc_xiaomi;
attribute vendor_hal_camerapostproc_xiaomi_client;
attribute vendor_hal_camerapostproc_xiaomi_server;
# Citsensor
attribute vendor_hal_citsensorservice_xiaomi;
attribute vendor_hal_citsensorservice_xiaomi_client;
attribute vendor_hal_citsensorservice_xiaomi_server;

View File

@ -1,6 +1,15 @@
type camera_persist_file, vendor_persist_type, file_type;
type vendor_hal_cameraperf_hwservice, hwservice_manager_type, protected_hwservice;
type vendor_hal_camerapostproc_xiaomi_hwservice, hwservice_manager_type;
vendor_internal_prop(vendor_camera_sensor_prop)
set_prop(hal_camera_default, vendor_camera_sensor_prop)
r_dir_file(hal_camera_default, camera_persist_file)
r_dir_file(hal_camera_default, mnt_vendor_file)
hal_server_domain(hal_camera_default, vendor_hal_cameraperf)
hal_server_domain(hal_camera_default, vendor_hal_camerapostproc_xiaomi)
add_hwservice(hal_camera_server, vendor_hal_cameraperf_hwservice)
add_hwservice(hal_camera_server, vendor_hal_camerapostproc_xiaomi_hwservice)
allow hal_camera_client vendor_hal_cameraperf_hwservice:hwservice_manager find;
allow hal_camera_client vendor_hal_camerapostproc_xiaomi_hwservice:hwservice_manager find;

4
sepolicy/vendor/hal_cameraperf.te vendored Normal file
View File

@ -0,0 +1,4 @@
add_hwservice(vendor_hal_cameraperf_server, vendor_hal_cameraperf_hwservice)
allow vendor_hal_cameraperf_client vendor_hal_cameraperf_hwservice:hwservice_manager find;
binder_call(vendor_hal_cameraperf_client, vendor_hal_cameraperf_server)
binder_call(vendor_hal_cameraperf_server, vendor_hal_cameraperf_client)

View File

@ -0,0 +1,4 @@
add_hwservice(vendor_hal_camerapostproc_xiaomi_server, vendor_hal_camerapostproc_xiaomi_hwservice)
allow vendor_hal_camerapostproc_xiaomi_client vendor_hal_camerapostproc_xiaomi_hwservice:hwservice_manager find;
binder_call(vendor_hal_camerapostproc_xiaomi_client, vendor_hal_camerapostproc_xiaomi_server)
binder_call(vendor_hal_camerapostproc_xiaomi_server, vendor_hal_camerapostproc_xiaomi_client)

View File

@ -1,3 +1,7 @@
# Camera
vendor.xiaomi.hardware.cameraperf::IMiCameraPerfService u:object_r:vendor_hal_cameraperf_hwservice:s0
vendor.xiaomi.hardware.campostproc::IMiPostProcService u:object_r:vendor_hal_camerapostproc_xiaomi_hwservice:s0
# Fingerprint
vendor.xiaomi.hardware.fx.tunnel::IMiFxTunnel u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0
vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0