Add sepolicies for battery defender server configurability

Test: Ensure that the GoogleBattery HAL can read/write to the
  sysfs nodes/android properties
Bug: 173080734
Merged-In: Id0333841fef09a9d6b6b801194b78bc410737481
Change-Id: Id0333841fef09a9d6b6b801194b78bc410737481
diff --git a/googlebattery/file_contexts b/googlebattery/file_contexts
index f4fc712..0d3004e 100644
--- a/googlebattery/file_contexts
+++ b/googlebattery/file_contexts
@@ -1 +1 @@
-/vendor/bin/hw/vendor\.google\.google_battery@1\.0-service-vendor                     u:object_r:hal_googlebattery_exec:s0
+/vendor/bin/hw/vendor\.google\.google_battery@1\.1-service-vendor                     u:object_r:hal_googlebattery_exec:s0
diff --git a/googlebattery/hal_googlebattery.te b/googlebattery/hal_googlebattery.te
index 6e6697b..fc08b28 100644
--- a/googlebattery/hal_googlebattery.te
+++ b/googlebattery/hal_googlebattery.te
@@ -7,6 +7,9 @@
 
 allow hal_googlebattery sysfs_batteryinfo:file rw_file_perms;
 allow hal_googlebattery self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
+allow hal_googlebattery sysfs_chargelevel:file rw_file_perms;
+
+set_prop(hal_googlebattery, vendor_battery_defender_prop)
 
 hwbinder_use(hal_googlebattery)
 add_hwservice(hal_googlebattery, hal_googlebattery_hwservice)