system/sepolicy: Add adaptive haptics system prop

Add system prop for adaptive haptics feature

Bug: 198239103
Test: Verified functionality
Ignore-AOSP-First: Cherry pick of aosp/2300027
Change-Id: I67a8047d015e007d22cbd54bc4f9a2fea0527b49
Merged-In: I67a8047d015e007d22cbd54bc4f9a2fea0527b49
Merged-In: I5dd21700c9f64d08785855436c4c5eeb2e88a616
Signed-off-by: Chris Paulo <chrispaulo@google.com>
This commit is contained in:
Chris Paulo 2022-11-15 08:41:53 +00:00
parent 42a610cd20
commit 2a3c5cbca3
3 changed files with 8 additions and 0 deletions

View file

@ -1341,3 +1341,6 @@ ro.gms.dck.eligible_wcc u:object_r:dck_prop:s0 exact int
# virtualization service properties
virtualizationservice.state.last_cid u:object_r:virtualizationservice_prop:s0 exact uint
# Adaptive haptics settings property
vibrator.adaptive_haptics.enabled u:object_r:adaptive_haptics_prop:s0 exact string

View file

@ -34,6 +34,7 @@ allow system_app wallpaper_file:file r_file_perms;
allow system_app icon_file:file r_file_perms;
# Write to properties
set_prop(system_app, adaptive_haptics_prop)
set_prop(system_app, arm64_memtag_prop)
set_prop(system_app, bluetooth_a2dp_offload_prop)
set_prop(system_app, bluetooth_audio_hal_prop)
@ -189,3 +190,6 @@ neverallow system_app fuse_device:chr_file *;
# bug reports, but not reads.
neverallow system_app shell_data_file:dir { no_w_dir_perms open search read };
neverallow system_app shell_data_file:file { open read ioctl lock };
# system_app should be the only domain writing the adaptive haptics prop
neverallow { domain -init -system_app } adaptive_haptics_prop:property_service set;

View file

@ -52,6 +52,7 @@ compatible_property_only(`
# Properties which can't be written outside system
system_restricted_prop(aac_drc_prop)
system_restricted_prop(adaptive_haptics_prop)
system_restricted_prop(arm64_memtag_prop)
system_restricted_prop(binder_cache_bluetooth_server_prop)
system_restricted_prop(binder_cache_system_server_prop)