mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-30 05:29:39 +00:00
While snapshot Easel power data is captured in bugreports via dumpstate, Easel does not provide low power stats on a recurring basis via PowerHAL, which is the type of data need to detect the presence and scope of power drain issues in the field. As a temporary workaround, this set of changes keeps cumulative counts of the number of times PowerHAL saw Easel's state (an existing sysfs node) as "on" (state 1) or "not on" (state 0 or 2), and logs the "on" count as cumulative count and the "not on" count as cumulative duration. This does not sufficiently address the long term need for cumulative stats, since this will just be comprised of essentially random snapshots of Easel's current state. However, for the known issue already being investigated, this should be enough to gauge the scope of the issue. sepolicy updates allow hal_power to search/read the directory/file containing Easel's current state: /sys/devices/virtual/misc/mnh_sm/state Bug: 77208137 Bug: 36576572 Test: Installed on taimen, used camera for various functions, used easel debug commands and properties to force it into different states, captured a bugreport and verified the content against observed "current state" values from monitoring the state file while performing similar camera functions. Change-Id: Ib1ee92db477d2a6c9d6f293fb4fcc2f753b8335a