summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorKhalid Zubair <kzubair@cyngn.com>2016-04-19 10:46:48 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-04-20 15:47:32 -0700
commit573fb3e32d8d479c06813b153c82f1e48e36ae4c (patch)
tree501cdafb954d2f9bb7fe380ed93e97658d5498fe /services
parent74e887cd5f726711c958d3b115614a337b4b33b3 (diff)
downloadframeworks_native-573fb3e32d8d479c06813b153c82f1e48e36ae4c.zip
frameworks_native-573fb3e32d8d479c06813b153c82f1e48e36ae4c.tar.gz
frameworks_native-573fb3e32d8d479c06813b153c82f1e48e36ae4c.tar.bz2
sensorservice: add power usage to dumpsys
Include each sensor's power usage info in the per-sensor dumpsys info section. Change-Id: If10535d1e7fe6a35d9385ce2e6083a4c5188a06d
Diffstat (limited to 'services')
-rw-r--r--services/sensorservice/SensorService.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index 28af943..8ab145a 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -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);