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
tree: 97b63fbc8523e333f665a158c6698dcee7b6798c
  1. metrics/