sensorservice: add power usage to dumpsys

Include each sensor's power usage info in the per-sensor dumpsys
info section.

Change-Id: If10535d1e7fe6a35d9385ce2e6083a4c5188a06d
This commit is contained in:
Khalid Zubair 2016-04-19 10:46:48 -07:00 committed by Gerrit Code Review
parent 74e887cd5f
commit 573fb3e32d

View File

@ -359,6 +359,8 @@ status_t SensorService::dump(int fd, const Vector<String16>& args)
result.appendFormat("non-wakeUp | ");
}
result.appendFormat("%.4f mA | ", s.getPowerUsage());
int bufIndex = mLastEventSeen.indexOfKey(s.getHandle());
if (bufIndex >= 0) {
const CircularBuffer* buf = mLastEventSeen.valueAt(bufIndex);