am d70a7737: am 6e7cbb7c: Merge "Add logs for the ungaze gesture." into cw-e-dev

* commit 'd70a773793bf9fce06ba8888908601b94090236d':
  Add logs for the ungaze gesture.
This commit is contained in:
Mojtaba Seyedhosseini
2015-09-22 22:08:13 +00:00
committed by Android Git Automerger
2 changed files with 10 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ option java_package com.android.server
# This is logged when the partial wake lock (keeping the device awake # This is logged when the partial wake lock (keeping the device awake
# regardless of whether the screen is off) is acquired or released. # regardless of whether the screen is off) is acquired or released.
2729 power_partial_wake_state (releasedorAcquired|1|5),(tag|3) 2729 power_partial_wake_state (releasedorAcquired|1|5),(tag|3)
# The device is being asked to go into a soft sleep (typically by the ungaze gesture).
# It logs the time remaining before the device would've normally gone to sleep without the request.
2731 power_soft_sleep_requested (savedwaketimems|2)
# #
# Leave IDs through 2739 for more power logs (2730 used by battery_discharge above) # Leave IDs through 2739 for more power logs (2730 used by battery_discharge above)

View File

@@ -1577,6 +1577,13 @@ public final class PowerManagerService extends SystemService
} }
if (mUserActivitySummary != USER_ACTIVITY_SCREEN_DREAM && userInactiveOverride) { if (mUserActivitySummary != USER_ACTIVITY_SCREEN_DREAM && userInactiveOverride) {
if ((mUserActivitySummary &
(USER_ACTIVITY_SCREEN_BRIGHT | USER_ACTIVITY_SCREEN_DIM)) != 0) {
// Device is being kept awake by recent user activity
long savedWakeTimeMs = now - nextTimeout;
EventLog.writeEvent(
EventLogTags.POWER_SOFT_SLEEP_REQUESTED, savedWakeTimeMs);
}
mUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM; mUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;
nextTimeout = -1; nextTimeout = -1;
} }