From 5712ba4dec1cc583b8d2e19590b735be2cb25ff2 Mon Sep 17 00:00:00 2001 From: George Lee Date: Sun, 11 Dec 2022 21:02:09 -0800 Subject: [PATCH] Add BrownoutDetected Events - gs201 sepolicy Brownout Detection is detected during the boot sequence. If the previous shutdown resulted in a reboot reason that has *ocp* or *uvlo* in it, the shutdown was due to brownout. Mitigation Logger should have logged the device state during the brownout. This event metric is to surface the logged data. Bug: 250009365 Test: Confirm triggering of events Ignore-AOSP-First: to detect brownout. Change-Id: Idfc02a8bde6088a5c504ee72014537555af78b04 Signed-off-by: George Lee --- whitechapel_pro/pixelstats_vendor.te | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/whitechapel_pro/pixelstats_vendor.te b/whitechapel_pro/pixelstats_vendor.te index 4ec563f6..48877bd9 100644 --- a/whitechapel_pro/pixelstats_vendor.te +++ b/whitechapel_pro/pixelstats_vendor.te @@ -34,3 +34,10 @@ allow pixelstats_vendor sysfs_bcl:file r_file_perms; #perf-metrics r_dir_file(pixelstats_vendor, sysfs_vendor_metrics) allow pixelstats_vendor sysfs_vendor_metrics:lnk_file r_file_perms; + +# BCL +allow pixelstats_vendor sysfs_bcl:dir search; +allow pixelstats_vendor sysfs_bcl:file r_file_perms; +allow pixelstats_vendor mitigation_vendor_data_file:dir search; +allow pixelstats_vendor mitigation_vendor_data_file:file { read write }; +get_prop(pixelstats_vendor, vendor_brownout_reason_prop);