Commit Graph

213 Commits

Author SHA1 Message Date
sreeshankark
5c2518eb11 sepolicy: qti: Allow hal_sensors_default to open & read oplus proc version
avc:  denied  { open } for  name="prjName" dev="proc" ino=4026531934 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:vendor_proc_oplus_version:s0 tclass=file permissive=0
avc:  denied  { open } for  name="engVersion" dev="proc" ino=4026531944 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:vendor_proc_oplus_version:s0 tclass=file permissive=0
avc:  denied  { read } for  name="prjName" dev="proc" ino=4026531934 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:vendor_proc_oplus_version:s0 tclass=file permissive=0
avc:  denied  { read } for  name="engVersion" dev="proc" ino=4026531944 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:vendor_proc_oplus_version:s0 tclass=file permissive=0
2023-10-31 18:59:28 +05:30
Sukrut4778
83dd99fa11 sepolicy: qti: dontaudit kernel rules
avc: denied { dac_override } for comm="kworker/u17:18" capability=1 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0
avc: denied { dac_override } for comm="kworker/u17:5" capability=1 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0
2023-10-30 20:55:59 +05:30
sreeshankark
d64a040800 sepolicy: ati: Allow vendor_rmt_storage to open sysfs file 2023-10-30 20:55:59 +05:30
sreeshankark
80b8e19e99 sepolicy: qti: Allow hal_camera_default to open and getattr from vendor_system_prop file 2023-10-30 20:55:59 +05:30
sreeshankark
2983479930 sepolicy: qti: Fix many denials
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:hal_bootctl_default:s0 tcontext=u:r:hal_bootctl_default:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:fsverity_init:s0 tcontext=u:r:fsverity_init:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_modprobe:s0 tcontext=u:r:vendor_modprobe:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_boringssl_self_test:s0 tcontext=u:r:vendor_boringssl_self_test:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netutils_wrapper:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_msm_irqbalanced:s0 tcontext=u:r:vendor_msm_irqbalanced:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:r:vold_prepare_subdirs:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:art_boot:s0 tcontext=u:r:art_boot:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:otapreopt_slot:s0 tcontext=u:r:otapreopt_slot:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:remount:s0 tcontext=u:r:remount:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:update_verifier:s0 tcontext=u:r:update_verifier:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_rfs_access:s0 tcontext=u:r:vendor_rfs_access:s0 tclass=capability
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_hal_usb_qti:s0 tcontext=u:r:vendor_hal_usb_qti:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_irsc_util:s0 tcontext=u:r:vendor_irsc_util:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:r:vendor_hal_perf_default:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_rmt_storage:s0 tcontext=u:r:vendor_rmt_storage:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:profcollectd:s0 tcontext=u:r:profcollectd:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:adbd:s0 tcontext=u:r:adbd:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_netmgrd:s0 tcontext=u:r:vendor_netmgrd:s0 tclass=capability permissive=0
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vendor_dpmd:s0 tcontext=u:r:vendor_dpmd:s0 tclass=capability permissive=0
2023-10-30 20:55:08 +05:30
sreeshankark
4ea2fd9b13 sepolicy: qti: Allow sys_admin permission for vdc
avc:  denied  { sys_admin } for  capability=21  scontext=u:r:vdc:s0 tcontext=u:r:vdc:s0 tclass=capability permissive=0
2023-10-27 18:52:42 +05:30
sreeshankark
9d4d16b3e5 doze: Use powerManager.wakeUp instead
powerManager.wakeUpWithProximityCheck is deprecated

Reference: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/PowerManager.java
2023-10-27 18:50:38 +05:30
sreeshankark
10a876db6d sepolicy: qti: Allow hal_sensors_default to search vendor_proc_oplus_version
avc:  denied  { search } for  name="oplusVersion" dev="proc" ino=4026531933 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:vendor_proc_oplus_version:s0 tclass=dir permissive=0
2023-10-27 18:50:38 +05:30
UtsavBalar1231
68c41c5489 sepolicy: qti: Grant perms to mount tracefs when CONFIG_DEBUG_FS
avc:  denied  { mounton } for  pid=1 comm="init" path="/sys/kernel/tracing" dev="tracefs" ino=1 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_debug:s0 tclass=dir permissive=0
2023-10-27 18:50:38 +05:30
sreeshankark
182d42df95 sepolicy: qti: Allow fsck to get attribute from sysfs file
type=1400 audit(0.0:7): avc:  denied  { getattr } for  path="/sys/devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:0/block/sda/sda16/partition" dev="sysfs" ino=60454 scontext=u:r:fsck:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
2023-10-27 18:50:38 +05:30
ekkusa
e2dc36f2c6 sepolicy: qti: Address fsck denial
type=1400 audit(1662729171.862:3274): avc: denied { sys_admin } for comm="e2fsck" capability=21 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
type=1400 audit(0.0:9): avc:  denied  { kill } for  capability=5  scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
2023-10-27 18:50:38 +05:30
ekkusa
491aedd063 sepolicy: qti: dontaudit unnecessary fsck rules
[   10.299826] type=1400 audit(16083046.175:3142): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299842] type=1400 audit(16083046.175:3143): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299858] type=1400 audit(16083046.175:3144): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299874] type=1400 audit(16083046.175:3145): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299889] type=1400 audit(16083046.175:3146): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299932] type=1400 audit(16083046.175:3147): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299949] type=1400 audit(16083046.175:3148): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299964] type=1400 audit(16083046.175:3149): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299981] type=1400 audit(16083046.175:3150): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.299997] type=1400 audit(16083046.175:3151): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300012] type=1400 audit(16083046.175:3152): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300042] type=1400 audit(16083046.175:3153): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300059] type=1400 audit(16083046.175:3154): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300075] type=1400 audit(16083046.175:3155): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300090] type=1400 audit(16083046.175:3156): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300106] type=1400 audit(16083046.175:3157): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300121] type=1400 audit(16083046.175:3158): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300137] type=1400 audit(16083046.175:3159): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300250] type=1400 audit(16083046.179:3160): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300267] type=1400 audit(16083046.179:3161): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300284] type=1400 audit(16083046.179:3162): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300300] type=1400 audit(16083046.179:3163): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300315] type=1400 audit(16083046.179:3164): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300331] type=1400 audit(16083046.179:3165): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300346] type=1400 audit(16083046.179:3166): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300362] type=1400 audit(16083046.179:3167): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
[   10.300378] type=1400 audit(16083046.179:3168): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0
2023-10-27 18:50:38 +05:30
lupesoltec
91fd2326b1 sepolicy: qti: Fix avc denials related to linkerconfig
avc: denied { kill } for comm="linkerconfig" capability=5 scontext=u:r:linkerconfig:s0 tcontext=u:r:linkerconfig:s0 tclass=capability permissive=0
2023-10-27 18:49:56 +05:30
Immanuel Raj
af51a76c40 sepolicy: qti: : fix vdc denial
avc: denied { kill } for comm="vdc" capability=5 scontext=u:r:vdc:s0 tcontext=u:r:vdc:s0 tclass=capability permissive=0
2023-10-27 18:38:03 +05:30
ShevT
0a78993500 sepolicy: qti: allow init write to proc file
Fix:
avc: denied { write } for comm="init" name="dirty_background_bytes" dev="proc" ino=36058 scontext=u:r:init:s0 tcontext=u:object_r:proc:s0 tclass=file permissive=0
avc: denied { write } for comm="init" name="dirty_bytes" dev="proc" ino=36059 scontext=u:r:init:s0 tcontext=u:object_r:proc:s0 tclass=file permissive=0
2023-10-27 18:38:03 +05:30
sreeshankark
802f874654 sepolicy: qti: allow hal_camera_default to read system_prop file
android.hardwar: type=1400 audit(0.0:16): avc:  denied  { read } for  name="u:object_r:system_prop:s0" dev="tmpfs" ino=10582 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:system_prop:s0 tclass=file permissive=0
2023-10-27 18:36:53 +05:30
sreeshankark
244521b64e sepolicy: qti: allow vendor_rmt_storage to read sysfs file
rmt_storage: type=1400 audit(0.0:17): avc:  denied  { read } for  name="name" dev="sysfs" ino=58041 scontext=u:r:vendor_rmt_storage:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
2023-10-21 18:51:50 +05:30
Semavi Ulusoy
f0c534137e sepolicy: qti: allow vendor_hal_oplusSensor_default to search block_device
auditd: type=1400 audit(0.0:17): avc: denied { search } for comm="vendor.oplus.ha" name="block" dev="tmpfs" ino=14361 scontext=u:r:vendor_hal_oplusSensor_default:s0 tcontext=u:object_r:block_device:s0 tclass=dir permissive=0
2023-10-21 18:46:18 +05:30
John Galt
ec1edc0008 oplus: Set a more correct doze brightness
Stock uses different AOD brightness values ranging from 10-50 nits.

We can only use one on AOSP, so let's use max from stock for AOD
brightness.

Inspired by
https://gerrit.aospa.co/c/AOSPA/android_device_nothing_phone1/+/27237

Change-Id: I12505be390753655b36e44dfd18e4b68311925be
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-10-19 11:59:28 +05:30
Pranav Vashi
c9fd367cb8 gpt-utils: Update AB_PTN_LIST
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-10-19 11:59:16 +05:30
Nick Reuter
13fda71aba sepolicy: qti: Label SM4350 partitions
Change-Id: I8d04c70cade862cff2e3fa1148dfa6040db57f53
2023-04-18 15:10:28 +02:00
Michael Bestas
c94a7269fb sepolicy: qti: Resolve vl53l1 denials
Change-Id: If0fc75186bcce23f0b9cc82ae13c37a30f57a26e
2023-04-18 01:12:55 +02:00
Albert Tang
594bc58b61 sepolicy: qti: Add Oppo labels for SM4350
Change-Id: If77a747fdee65c22c6a491d58cf2d23fee639bd3
2023-04-17 14:13:30 -05:00
Albert Tang
d005182f10 sepolicy: qti: Label SM4350 charging sysfs path
Change-Id: Ie8d60494cb7eec9ec67b590d0ecd04663ce7a614
2023-04-17 14:13:22 -05:00
Bruno Martins
4a07f13820 sepolicy: qti: Remove duplicate lahaina wakeup nodes
Needed after I53aad29624e904b092c3cf73d498c735cf2f1b3e

Change-Id: I245c50c6e5c5d93a58cb4fe11e8e3aef3003ae29
2023-03-24 11:51:11 +00:00
Michael Bestas
5a76738616 Automatic translation import
Change-Id: I57d0ae6b9978bcd2d1afabb520216ba414f974a9
2023-03-23 16:38:23 +02:00
Philipp Albrecht
d462ec583d sepolicy: qti: Label SM7250 charging sysfs path
Change-Id: I60fae0b8ec1ef8a3ee88de7a67db5718392539b6
2023-02-28 22:26:26 +01:00
KakatkarAkshay
fbde82d9fa sepolicy: qti: Label SM7250 vibrator node
Change-Id: I67155d9269269aac867eb4f8852b7f496a129ca0
2023-02-28 22:26:26 +01:00
LuK1337
ec719d5ded sepolicy: qti: Label SM7250 wakeup nodes
for i in $(realpath /sys/class/wakeup/*); do if ! echo "$(ls -dZ $i)" | grep -q sysfs_wakeup; then echo genfscon sysfs $(echo $i | sed -e 's|/sys||g' -e 's|wakeup/wakeup.|wakeup|g' -e 's|wakeup[0-9]*|wakeup|g') u:object_r:sysfs_wakeup:s0; fi; done | sort -u

Change-Id: I482a657cb6edfcef92d52981ce2cbe3a0e174a5f
2023-02-28 22:26:26 +01:00
KakatkarAkshay
608aee50e2 sepolicy: qti: Label vendor.oplus.hardware.cameraMDM@1.0-service
As seen on SM7250

Change-Id: I7e942a556b7f18fd30735ba8b4ab5e53ce679ca2
2023-02-28 22:26:26 +01:00
LuK1337
7f301f9342 sepolicy: qti: Label additional SM8350 wakeup nodes
Introduced in A13 kernel.

Change-Id: I7dbf6a8b54290222127513d62859ffe639dea3df
2023-02-22 01:17:25 +01:00
pjgowtham
2ba9d31401 sepolicy: qti: Label ST21 NFC
Change-Id: I98a2db0aed52c227737db88d4f40809970368737
2023-02-22 01:17:25 +01:00
Albert Tang
5dd007e2a4 sepolicy: qti: Label vendor.oplus.hardware.cwb hwservice
Change-Id: Ida57e20d1f733398c3da8673b9c6dd537cbc9205
2023-02-22 01:17:25 +01:00
Albert Tang
6d5818a5e3 sepolicy: qti: Label new display and camera props
Change-Id: I4e410a65bc181d893f5118099af03ef764ccd6d4
2023-02-22 01:17:25 +01:00
LuK1337
969b0f8955 sepolicy: qti: Label vendor.oplus.hardware.cameraextension hwservice
Spotted on OOS 13.

Change-Id: I7ce474a3c8b5356a24d5b60b940a79a5a2d80aa4
2023-02-20 13:09:38 +01:00
Michael Bestas
ed9abba51b Automatic translation import
Change-Id: Iebb9a21c52f633aa9c6ddd0009a88445a105b8c9
2023-02-13 16:05:21 +02:00
Michael Bestas
9f048526d5 sepolicy: qti: Remove duplicate wakeup nodes
Needed after I026cd6930459262c31c401e57444cfe2b60357b7

Change-Id: I0522bafab2605b3d0ab5a147154b32fa9ee3ce37
2023-01-19 16:21:33 +01:00
LuK1337
15d4c81836 sepolicy: qti: Add selinux rules for ams-tof
Change-Id: I003da0e0286fc1e6db13fe5db63d710a5d90015f
2023-01-14 13:17:55 +01:00
Michael Bestas
9fb26aae02 Automatic translation import
Change-Id: I47fb5adafce6fcfc04925503cd433eebdc4aad3f
2023-01-10 04:41:40 +02:00
Edwin Moquete
7a9d685192 sepolicy: qti: Label additional SM8250 wakeup nodes
Introduced in A13 kernel.

Change-Id: Ie2f567b47a79d8eeb9839d840fb4a08f271256bd
2022-12-22 19:45:34 +01:00
LuK1337
68e353f71e sepolicy: qti: Add rules for stmvl53l1 TOF sensor
Change-Id: I45714c6389c8c60904e0f1094bfb79f701832676
2022-12-21 20:39:55 +01:00
Michael Bestas
5c2acd54d9 Automatic translation import
Change-Id: I57a64bdf02fd1e03b0bd709799e475eba4da4084
2022-12-16 20:57:42 +02:00
Bruno Martins
a5332c7fee KeyHandler: Fix compilation for QPR1 merge
Change-Id: Id01559565bbee715f67213c9d4c99dddac4a761c
2022-12-06 18:04:20 +00:00
Bruno Martins
06034b73be doze: Fix compilation for QPR1 merge
Change-Id: Ifa602ed1ae0734dbda40663770f2e54075bfa208
2022-12-06 18:03:47 +00:00
Albert Tang
bd2d84c295 livedisplay: Check current state before toggling AF/SE
This prevents us from sending unexpected panel commands.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/4790
Change-Id: I97c5a008f242c861cafdec392b19ab9435a5239b
2022-12-05 16:58:45 +01:00
LuK1337
99cfe97b5c sepolicy: qti: Label opproduct partition
Change-Id: If0a3209b07ba2dbddc404be98620fc3cd5867294
2022-12-01 11:45:58 +01:00
Michael Bestas
d1930f19ab Automatic translation import
Change-Id: I692f213694a2de3f0b1db87b93f14041bcbaac93
2022-11-25 15:03:28 +02:00
AnierinB
cc3c3cbf70 sepolicy: qti: Allow kernel to read vendor_file
There are two ways for the kernel to load iris5.fw. The first way is
via fw_get_filesystem_firmware(), which read iris5.fw directly from the
filesystem using filp_read(). The second way gets FW via ueventd, which
calls request_firmware().

Because the kernel unconditionally calls fw_get_filesystem_firmware()
for iris5, the first way always gets executed. However, the current
sepolicy denies read access to iris5.fw for the kernel, causing this way
to never work. The second way is used only on ioctl(), which would
likely be sent from HWC. Unlike the first way, the second way *does*
work as-is, and since HWC is always started when booting into Android,
we don't have to worry about the first way being broken.

However, HWC doesn't run offline charging mode, so we have to rely on
the first way for that case. Unfortunately, since the first way is
broken, offline charging fails to work properly as a result. As such, we
need to fix that denial to make the first way work again.

Change-Id: Iba43afc5dba1c64d8ced9f374bbf9f0457db3c92
2022-11-21 22:39:29 +00:00
jabashque
12fcd01d96 vibrator: Redo LedVibratorDevice effects and vibrator timeout handling
For aw8697_haptic, OOS 12 never really properly implemented any effect
other than CLICK and HEAVY_CLICK. Let's implement our own TEXTURE_TICK,
TICK, CLICK, and HEAVY_CLICK so that the user can actually feel a
noticeable difference between each haptic effect.

As a quick summary:
- CLICK: same as oplus CLICK, but with vmax set to 2500.
- DOUBLE_CLICK: replaced with our CLICK played twice in a row, w/ a
100ms delay
- TICK: same as oplus CLICK, but with vmax set to 1400.
- HEAVY_CLICK: same as oplus CLICK, but with vmax set to 2500 and
  waveform_index set to 4.
- TEXTURE_TICK: same as oplus CLICK, but with vmax set to 60 and
  waveform_index set to 2.

In addition, modify LedVibratorDevice's on() to better reflect the
timeout duration actually being passed in to the function. The original
tried to change waveforms instead for various durations at 102 ms or
lower, which didn't really work out in practice for our vibrator.

Change-Id: Ifb769bc2292774afa4977026787a7882430c09d0
2022-11-12 20:20:44 +00:00
Michael Bestas
d9929c1fdd Automatic translation import
Change-Id: I5f47631908c351b00fec9146d86cffff59e86cac
2022-11-03 01:57:23 +02:00