Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 573fb3e3 authored by Khalid Zubair's avatar Khalid Zubair Committed by Gerrit Code Review
Browse files

sensorservice: add power usage to dumpsys

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

Change-Id: If10535d1e7fe6a35d9385ce2e6083a4c5188a06d
parent 74e887cd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);