emulator: add a SELinux entry for goldfish battery.

This change labels /sys/class/power_supply sysfs_batteryinfo to allow
reading the battery status.

Bug: 109735735
Test: emulator -show-kernel -verbose -kernel /tmp/arm64/4.4/kernel-qemu2 -no-boot-anim
Change-Id: I9851ccdb6ae38a876318d87917a3b5f35545c57e
Signed-off-by: Roman Kiryanov <rkir@google.com>
diff --git a/sepolicy/common/genfs_contexts b/sepolicy/common/genfs_contexts
index 1b81626..02f08f0 100644
--- a/sepolicy/common/genfs_contexts
+++ b/sepolicy/common/genfs_contexts
@@ -16,5 +16,8 @@
 genfscon sysfs /devices/virtual/mac80211_hwsim/hwsim0/net u:object_r:sysfs_net:s0
 genfscon sysfs /devices/virtual/mac80211_hwsim/hwsim1/net u:object_r:sysfs_net:s0
 
+# /sys/class/power_supply
+genfscon sysfs /devices/platform/9020000.goldfish_battery/power_supply u:object_r:sysfs_batteryinfo:s0
+
 # /proc/<pid>/ns
 genfscon nsfs / u:object_r:nsfs:s0