From f6afebf934cb392e5e39e2f18a8509d90d33b8d8 Mon Sep 17 00:00:00 2001 From: Roman Kiryanov Date: Tue, 23 Feb 2021 15:08:56 -0800 Subject: [PATCH] Move qemu.sf.lcd_density into system/sepolicy qemu.sf.lcd_density is rerefenced by surfaceflinger and zygote. Bug: 178144237 Test: presubmit Signed-off-by: Roman Kiryanov Change-Id: Iede75d1170aeac9d020d60a3a66a1f69cee46abf Merged-In: Iede75d1170aeac9d020d60a3a66a1f69cee46abf --- private/compat/30.0/30.0.ignore.cil | 1 + private/property_contexts | 3 +++ private/surfaceflinger.te | 3 +++ private/zygote.te | 3 +++ public/property.te | 1 + 5 files changed, 11 insertions(+) diff --git a/private/compat/30.0/30.0.ignore.cil b/private/compat/30.0/30.0.ignore.cil index 45826b011..0e89d37ab 100644 --- a/private/compat/30.0/30.0.ignore.cil +++ b/private/compat/30.0/30.0.ignore.cil @@ -84,6 +84,7 @@ profcollectd_exec profcollectd_service qemu_hw_prop + qemu_sf_lcd_density_prop radio_core_data_file reboot_readiness_service remote_prov_app diff --git a/private/property_contexts b/private/property_contexts index ff84dcc13..5c3a84cd3 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -189,6 +189,9 @@ ro.dalvik. u:object_r:dalvik_prop:s0 # qemu_hw_prop is read/written by both system and vendor. qemu.hw.mainkeys u:object_r:qemu_hw_prop:s0 +# qemu_sf_lcd_density_prop is read/written by both system and vendor. +qemu.sf.lcd_density u:object_r:qemu_sf_lcd_density_prop:s0 exact int + # Shared between system server and wificond wifi. u:object_r:wifi_prop:s0 wlan. u:object_r:wifi_prop:s0 diff --git a/private/surfaceflinger.te b/private/surfaceflinger.te index 8549bd54c..640306fd6 100644 --- a/private/surfaceflinger.te +++ b/private/surfaceflinger.te @@ -58,6 +58,9 @@ set_prop(surfaceflinger, exported3_system_prop) set_prop(surfaceflinger, ctl_bootanim_prop) set_prop(surfaceflinger, surfaceflinger_display_prop) +# Get properties. +get_prop(surfaceflinger, qemu_sf_lcd_density_prop) + # Use open files supplied by an app. allow surfaceflinger appdomain:fd use; allow surfaceflinger { app_data_file privapp_data_file }:file { read write }; diff --git a/private/zygote.te b/private/zygote.te index 1a3bcc6f8..83323c9a4 100644 --- a/private/zygote.te +++ b/private/zygote.te @@ -213,6 +213,9 @@ get_prop(zygote, media_variant_prop) # Allow zygote to read ro.control_privapp_permissions and ro.cp_system_other_odex get_prop(zygote, packagemanager_config_prop) +# Allow zygote to read qemu.sf.lcd_density +get_prop(zygote, qemu_sf_lcd_density_prop) + # Allow zygote to read /apex/apex-info-list.xml allow zygote apex_info_file:file r_file_perms; diff --git a/public/property.te b/public/property.te index 3f3f148f6..506e98585 100644 --- a/public/property.te +++ b/public/property.te @@ -192,6 +192,7 @@ system_public_prop(nfc_prop) system_public_prop(ota_prop) system_public_prop(powerctl_prop) system_public_prop(qemu_hw_prop) +system_public_prop(qemu_sf_lcd_density_prop) system_public_prop(radio_control_prop) system_public_prop(radio_prop) system_public_prop(serialno_prop)