metrics: Clean up user-active code.

Stop listening for the soon-to-deleted PowerStateChanged
D-Bus signal from powerd; the code that was listening for
it had some issues (there was no guarantee that it'd run
before the system suspended, and resumes weren't handled at

Also remove the session-state- and screen-lock-handling
code; it provided an inaccurate view of user activity (what
if the user is listening to music with the screen locked or
if they don't have screen-locking enabled?).

Track uptime instead via a timer that fires every five

TEST=manual: ran metrics_daemon --nodaemon and watched the

Change-Id: I4ad74773daefa01afdea080d20001ff1944c2eee
Reviewed-by: Daniel Erat <>
Commit-Queue: Daniel Erat <>
Tested-by: Daniel Erat <>
5 files changed