sm8350-common: Add xiaomi cit sensor service
This service contains notifiers (Backlight2SlpiNotifier, Freq2SlpiNotifier) which are responsible for relaying current brightness and refresh rate to our under-display light sensor. Without it, the screen brightness affects light sensor readings, making auto brightness unusable. Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com> Change-Id: I1e6249e915e4973167dc1642af5e15717d2c03ef
This commit is contained in:
parent
42b801c2e4
commit
5a9786b385
@ -19,6 +19,15 @@
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.xiaomi.hardware.citsensorservice</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>ICitSensorService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>vendor.xiaomi.hardware.fingerprintextension</name>
|
||||
<version>1.0</version>
|
||||
|
@ -653,6 +653,14 @@ vendor/lib64/jcos_nq_client.so
|
||||
vendor/lib64/ls_nq_client.so
|
||||
vendor/lib64/se_nq_extn_client.so
|
||||
|
||||
# Sensors (citsensor)
|
||||
vendor/bin/hw/vendor.xiaomi.hardware.citsensorservice@1.1-service
|
||||
vendor/etc/init/vendor.xiaomi.hardware.citsensorservice@1.1-service.rc
|
||||
vendor/etc/vintf/manifest/vendor.xiaomi.hardware.citsensorservice@1.1-service.xml
|
||||
vendor/lib64/hw/vendor.xiaomi.hardware.citsensorservice@1.1-impl.so
|
||||
vendor/lib64/vendor.xiaomi.hardware.citsensorservice@1.0.so
|
||||
vendor/lib64/vendor.xiaomi.hardware.citsensorservice@1.1.so
|
||||
|
||||
# Snapdragon Computer Vision Engine
|
||||
vendor/lib/libscveCommon.so
|
||||
vendor/lib/libscveCommon_stub.so
|
||||
|
3
sepolicy/vendor/attributes
vendored
Normal file
3
sepolicy/vendor/attributes
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
attribute vendor_hal_citsensorservice_xiaomi;
|
||||
attribute vendor_hal_citsensorservice_xiaomi_client;
|
||||
attribute vendor_hal_citsensorservice_xiaomi_server;
|
2
sepolicy/vendor/file_contexts
vendored
2
sepolicy/vendor/file_contexts
vendored
@ -33,7 +33,9 @@
|
||||
/sys/bus/iio/devices u:object_r:vendor_sysfs_iio:s0
|
||||
/sys/devices/platform/us_prox.0/iio:device1(/.*)? u:object_r:vendor_sysfs_iio:s0
|
||||
/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pmk8350@0:vadc@3100/iio:device0(/.*)? u:object_r:vendor_sysfs_iio:s0
|
||||
/sys/devices/platform/soc/soc:qcom,dsi-display-primary/mi_display/disp-DSI-0/dynamic_fps u:object_r:vendor_sysfs_graphics:s0
|
||||
/vendor/bin/hw/android\.hardware\.sensors@2.1-service\.xiaomi_sm8350-multihal u:object_r:hal_sensors_default_exec:s0
|
||||
/vendor/bin/hw/vendor\.xiaomi\.hardware\.citsensorservice@1\.1-service u:object_r:vendor_hal_citsensorservice_xiaomi_default_exec:s0
|
||||
|
||||
# Fingerprint
|
||||
/dev/goodix_fp u:object_r:vendor_fingerprint_device:s0
|
||||
|
3
sepolicy/vendor/hwservice_contexts
vendored
3
sepolicy/vendor/hwservice_contexts
vendored
@ -13,3 +13,6 @@ vendor.xiaomi.hardware.mlipay::IMlipayService u:
|
||||
|
||||
# NFC
|
||||
vendor.nxp.nxpnfc::INxpNfc u:object_r:hal_nfc_hwservice:s0
|
||||
|
||||
# Sensors
|
||||
vendor.xiaomi.hardware.citsensorservice::ICitSensorService u:object_r:vendor_hal_citsensorservice_xiaomi_hwservice:s0
|
||||
|
23
sepolicy/vendor/vendor_hal_citsensorservice_xiaomi.te
vendored
Normal file
23
sepolicy/vendor/vendor_hal_citsensorservice_xiaomi.te
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
type vendor_hal_citsensorservice_xiaomi_hwservice, hwservice_manager_type, protected_hwservice;
|
||||
|
||||
type vendor_hal_citsensorservice_xiaomi_default, domain;
|
||||
hal_server_domain(vendor_hal_citsensorservice_xiaomi_default, vendor_hal_citsensorservice_xiaomi)
|
||||
|
||||
type vendor_hal_citsensorservice_xiaomi_default_exec, exec_type, vendor_file_type, file_type;
|
||||
init_daemon_domain(vendor_hal_citsensorservice_xiaomi_default)
|
||||
|
||||
hal_attribute_hwservice(vendor_hal_citsensorservice_xiaomi, vendor_hal_citsensorservice_xiaomi_hwservice)
|
||||
|
||||
binder_call(vendor_hal_citsensorservice_xiaomi_client, vendor_hal_citsensorservice_xiaomi_server)
|
||||
binder_call(vendor_hal_citsensorservice_xiaomi_server, vendor_hal_citsensorservice_xiaomi_client)
|
||||
|
||||
allow vendor_hal_citsensorservice_xiaomi self:{ socket qipcrtr_socket } create_socket_perms;
|
||||
allowxperm vendor_hal_citsensorservice_xiaomi self:{ socket qipcrtr_socket } ioctl msm_sock_ipc_ioctls;
|
||||
|
||||
allow vendor_hal_citsensorservice_xiaomi_default fwk_sensor_hwservice:hwservice_manager find;
|
||||
allow vendor_hal_citsensorservice_xiaomi_default system_server:binder call;
|
||||
|
||||
r_dir_file(vendor_hal_citsensorservice_xiaomi_default, vendor_sysfs_graphics)
|
||||
|
||||
allow vendor_hal_citsensorservice_xiaomi_default input_device:dir r_dir_perms;
|
||||
allow vendor_hal_citsensorservice_xiaomi_default input_device:chr_file rw_file_perms;
|
Loading…
Reference in New Issue
Block a user