OSDN Git Service

ConnectivityService: log wakelock activity in dumps
authorHugo Benichi <hugobenichi@google.com>
Thu, 30 Mar 2017 01:46:05 +0000 (10:46 +0900)
committerHugo Benichi <hugobenichi@google.com>
Thu, 30 Mar 2017 23:59:59 +0000 (08:59 +0900)
commitaf52d7ae1253cec02441d721af7c490a50c01567
treeddf8238319213057335d6903442b3a4abaa86046
parente940d5458d993fa844ec609197646f0a86ce1a71
ConnectivityService: log wakelock activity in dumps

This patch adds wakelock acquire and release activity to
ConnectivityService logs in dumpsys. All of the last 20 acquire and
release operations are logged.

This patch also:
  - does a bit of cleanup to related dumpsys logs
  - unify pretty printing of internal event ids to their names.
  - delete mInetLog which was obsolete and not used.

Example of logs:
  NetTransition WakeLock activity (most recent first):
    03-30 02:15:40.628 - RELEASE 1 by EVENT_EXPIRE_NET_TRANSITION_WAKELOCK: not released (serial number was 2)
    03-30 02:15:09.965 - ACQUIRE 2 for NetworkAgentInfo [WIFI () - 101]
    03-30 02:15:01.877 - RELEASE 1 by EVENT_CLEAR_NET_TRANSITION_WAKELOCK: released
    03-30 02:14:40.598 - ACQUIRE 1 for NetworkAgentInfo [WIFI () - 100]

Test: inspected result of $ adb shell dumpsys connectivity
Bug: 36703718
Change-Id: Ia8e2016fc512ee798ef0adc3f612d1f6c33d4870
services/core/java/com/android/server/ConnectivityService.java