Snap for 7022234 from 8f4bd5babf772e224ae06a1f48b3062be5d5fd71 to master-smart-exp2-release

Bug:175172404
Merged-In: I36df4ace3a364f69c0305f5735405e71bc4169aa
Change-Id: I0845f36bc74d3c84ef2571021764bc1b4ae2b7ba
(cherry picked from commit 16498c7b80ff239b26a2a62b333fc2c8e9b5873e)
diff --git a/vendor/google/genfs_contexts b/vendor/google/genfs_contexts
index 3edf8b0..bea397d 100644
--- a/vendor/google/genfs_contexts
+++ b/vendor/google/genfs_contexts
@@ -13,3 +13,19 @@
 # Battery
 genfscon sysfs /devices/platform/soc/soc:google,battery/power_supply/battery    u:object_r:sysfs_batteryinfo:s0
 genfscon sysfs /devices/platform/soc/880000.i2c/i2c-1/1-0061/power_supply/wireless    u:object_r:sysfs_batteryinfo:s0
+
+# Charger
+genfscon sysfs /devices/platform/soc/soc:google,charger/charge_start_level      u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/charge_stop_level       u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_drainto_soc          u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_recharge_soc         u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_recharge_voltage     u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_abs_temp      u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_soc           u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_temp          u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_resume_time          u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_trigger_temp         u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_trigger_time         u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_trigger_voltage      u:object_r:sysfs_chargelevel:s0
+genfscon sysfs /devices/platform/soc/soc:google,charger/bd_temp_enable          u:object_r:sysfs_chargelevel:s0
+
diff --git a/vendor/qcom/common/hal_dumpstate_impl.te b/vendor/qcom/common/hal_dumpstate_impl.te
index 622cff9..df0e3c5 100644
--- a/vendor/qcom/common/hal_dumpstate_impl.te
+++ b/vendor/qcom/common/hal_dumpstate_impl.te
@@ -115,6 +115,8 @@
 # Query and dump power supply nodes
 allow hal_dumpstate_impl sysfs_batteryinfo:dir search;
 allow hal_dumpstate_impl sysfs_batteryinfo:file r_file_perms;
+allow hal_dumpstate_impl sysfs_chargelevel:dir search;
+allow hal_dumpstate_impl sysfs_chargelevel:file r_file_perms;
 
 # Dump QCOM FG content
 allow hal_dumpstate_impl debugfs_fg_sram:dir search;