Add charger related property contexts

ro.enable_boot_charger_mode and sys.boot_from_charger_mode are moved to
new property contexts for charger props to remove exported*_prop.

Bug: 155844385
Test: boot device with ro.enable_boot_charger_mode
Change-Id: I17d195d3c9c002a42125d46a5efcdb890f1c2a5c
This commit is contained in:
Inseob Kim 2020-07-10 14:15:15 +09:00
parent 881f8c6b2d
commit 8ef4792f01
5 changed files with 26 additions and 5 deletions

View file

@ -5,5 +5,22 @@ typeattribute charger coredomain;
set_prop(charger, system_prop)
set_prop(charger, exported_system_prop)
set_prop(charger, exported3_system_prop)
set_prop(charger, charger_status_prop)
get_prop(charger, charger_prop)
get_prop(charger, charger_config_prop)
compatible_property_only(`
neverallow {
-init
-dumpstate
-charger
} charger_prop:file no_rw_file_perms;
')
neverallow {
-init
-dumpstate
-vendor_init
-charger
} { charger_config_prop charger_status_prop }:file no_rw_file_perms;

View file

@ -37,7 +37,9 @@
build_vendor_prop
camera_config_prop
cgroup_bpf
charger_config_prop
charger_exec
charger_status_prop
color_display_service
content_capture_service
crossprofileapps_service

View file

@ -1359,6 +1359,7 @@
(typeattributeset exported3_default_prop_30_0
( exported3_default_prop
camera_config_prop
charger_config_prop
drm_service_config_prop
hdmi_config_prop
keyguard_config_prop
@ -1396,7 +1397,7 @@
(typeattributeset exported_pm_prop_30_0 (exported_pm_prop))
(typeattributeset exported_radio_prop_30_0 (exported_radio_prop telephony_status_prop))
(typeattributeset exported_secure_prop_30_0 (exported_secure_prop))
(typeattributeset exported_system_prop_30_0 (exported_system_prop))
(typeattributeset exported_system_prop_30_0 (exported_system_prop charger_status_prop))
(typeattributeset exported_system_radio_prop_30_0
( exported_system_radio_prop
usb_config_prop

View file

@ -227,7 +227,9 @@ ro.nnapi.extensions.deny_on_product u:object_r:nnapi_ext_deny_pro
ro.cold_boot_done u:object_r:cold_boot_done_prop:s0
# Charger properties
ro.charger. u:object_r:charger_prop:s0
ro.charger. u:object_r:charger_prop:s0
sys.boot_from_charger_mode u:object_r:charger_status_prop:s0 exact int
ro.enable_boot_charger_mode u:object_r:charger_config_prop:s0 exact bool
# Virtual A/B properties
ro.virtual_ab.enabled u:object_r:virtual_ab_prop:s0
@ -416,8 +418,6 @@ external_storage.projid.enabled u:object_r:storage_config_prop:s0 exact bool
external_storage.casefold.enabled u:object_r:storage_config_prop:s0 exact bool
external_storage.sdcardfs.enabled u:object_r:storage_config_prop:s0 exact bool
ro.enable_boot_charger_mode u:object_r:exported3_default_prop:s0 exact bool
ro.lmk.critical u:object_r:lmkd_config_prop:s0 exact int
ro.lmk.critical_upgrade u:object_r:lmkd_config_prop:s0 exact bool
ro.lmk.debug u:object_r:lmkd_config_prop:s0 exact bool
@ -645,7 +645,6 @@ ro.vendor.redirect_socket_calls u:object_r:vendor_socket_hook_prop:s0 exact bool
service.bootanim.exit u:object_r:exported_system_prop:s0 exact int
sys.boot_from_charger_mode u:object_r:exported_system_prop:s0 exact int
sys.init.userspace_reboot.in_progress u:object_r:userspace_reboot_exported_prop:s0 exact bool
sys.use_memfd u:object_r:use_memfd_prop:s0 exact bool

View file

@ -61,6 +61,7 @@ system_restricted_prop(binder_cache_telephony_server_prop)
system_restricted_prop(boot_status_prop)
system_restricted_prop(bq_config_prop)
system_restricted_prop(build_prop)
system_restricted_prop(charger_status_prop)
system_restricted_prop(fingerprint_prop)
system_restricted_prop(init_service_status_prop)
system_restricted_prop(libc_debug_prop)
@ -108,6 +109,7 @@ system_vendor_config_prop(audio_config_prop)
system_vendor_config_prop(build_odm_prop)
system_vendor_config_prop(build_vendor_prop)
system_vendor_config_prop(camera_config_prop)
system_vendor_config_prop(charger_config_prop)
system_vendor_config_prop(cpu_variant_prop)
system_vendor_config_prop(dalvik_config_prop)
system_vendor_config_prop(drm_service_config_prop)