Android T Preview 1
Allow PowerStatsHAL to read NFC power state stats

This change - in combination with the associated code change - allows
PowerStatsHAL to read high-level NFC power state stats from sysfs.

Without this sepolicy, the code change produces the following errors:
  02-01 20:12:40.350  1023  1023 W stats@1.0-servi: type=1400
  audit(0.0:32): avc: denied { read } for name="power_stats" dev="sysfs"
  ino=67037 scontext=u:r:hal_power_stats_default:s0
  tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
  02-01 20:12:40.353  1023  1023 E libpixelpowerstats: getResults:Failed
  to open file /sys/class/misc/st21nfc/device/power_stats Error =
  Permission denied: Permission denied

Bug: 217388683
Test: lshal debug android.hardware.power.stats@1.0::IPowerStats/default
Change-Id: I84d212849c9e1d1b1b009387a6e689a9487a1928
1 file changed