From 916163cf1ba1419eee6be4d21b4285ff0ffe1f6f Mon Sep 17 00:00:00 2001 From: Songchun Fan Date: Tue, 28 Apr 2020 13:24:54 -0700 Subject: [PATCH] Define vendor-specific property ro.incremental.enable [Will cherry-pick to AOSP] Make ro.incremental.enable a vendor-specific property. Allow system_server and vold to read this property. Test: manual BUG: 155212902 Change-Id: I8ff8837af635fa8e7b5bb02e5f6de5ac15b5023b Merged-In: I8ff8837af635fa8e7b5bb02e5f6de5ac15b5023b --- private/compat/29.0/29.0.ignore.cil | 1 + private/property_contexts | 3 +++ private/system_server.te | 3 +++ public/property.te | 1 + public/vendor_init.te | 1 + public/vold.te | 1 + 6 files changed, 10 insertions(+) diff --git a/private/compat/29.0/29.0.ignore.cil b/private/compat/29.0/29.0.ignore.cil index dce7880af..a1780f07b 100644 --- a/private/compat/29.0/29.0.ignore.cil +++ b/private/compat/29.0/29.0.ignore.cil @@ -54,6 +54,7 @@ hal_tv_tuner_hwservice hal_vibrator_service incremental_control_file + incremental_prop incremental_service init_perf_lsm_hooks_prop init_svc_debug_prop diff --git a/private/property_contexts b/private/property_contexts index 10f029f81..b29ef3c4f 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -249,6 +249,9 @@ persist.sys.userspace_reboot.log. u:object_r:userspace_reboot_log_prop:s0 # history size. ro.lib_gui.frame_event_history_size u:object_r:bq_config_prop:s0 +# Property to enable incremental feature +ro.incremental.enable u:object_r:incremental_prop:s0 + # Properties to configure userspace reboot. init.userspace_reboot.is_supported u:object_r:userspace_reboot_config_prop:s0 exact bool init.userspace_reboot.sigkill.timeoutmillis u:object_r:userspace_reboot_config_prop:s0 exact int diff --git a/private/system_server.te b/private/system_server.te index bfac1a6ec..84f881077 100644 --- a/private/system_server.te +++ b/private/system_server.te @@ -678,6 +678,9 @@ get_prop(system_server, apk_verity_prop) # Read wifi.interface get_prop(system_server, wifi_prop) +# Read the vendor property that indicates if Incremental features is enabled +get_prop(system_server, incremental_prop) + # Create a socket for connections from debuggerd. allow system_server system_ndebug_socket:sock_file create_file_perms; diff --git a/public/property.te b/public/property.te index f69f2e768..e63bd0179 100644 --- a/public/property.te +++ b/public/property.te @@ -117,6 +117,7 @@ system_vendor_config_prop(exported_camera_prop) system_vendor_config_prop(exported_config_prop) system_vendor_config_prop(exported_default_prop) system_vendor_config_prop(exported3_default_prop) +system_vendor_config_prop(incremental_prop) system_vendor_config_prop(media_variant_prop) system_vendor_config_prop(storage_config_prop) system_vendor_config_prop(userspace_reboot_config_prop) diff --git a/public/vendor_init.te b/public/vendor_init.te index c070dff6a..9db846b21 100644 --- a/public/vendor_init.te +++ b/public/vendor_init.te @@ -228,6 +228,7 @@ set_prop(vendor_init, exported2_system_prop) set_prop(vendor_init, exported2_vold_prop) set_prop(vendor_init, exported3_default_prop) set_prop(vendor_init, exported3_radio_prop) +set_prop(vendor_init, incremental_prop) set_prop(vendor_init, logd_prop) set_prop(vendor_init, log_tag_prop) set_prop(vendor_init, log_prop) diff --git a/public/vold.te b/public/vold.te index e2985677b..5d3eccf76 100644 --- a/public/vold.te +++ b/public/vold.te @@ -202,6 +202,7 @@ set_prop(vold, ota_prop) set_prop(vold, boottime_prop) set_prop(vold, boottime_public_prop) get_prop(vold, storage_config_prop) +get_prop(vold, incremental_prop) # ASEC allow vold asec_image_file:file create_file_perms;