summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-07-13 14:48:08 -0700
committerDianne Hackborn <hackbod@google.com>2015-07-15 09:59:07 -0700
commit280a64e793d081847c5dcea23ed9be38aa5332d2 (patch)
treea9ea0a4aca5e578efb1b9e252477cedfa79c547f /cmds
parent18709f9a0095afe6dba11f9dd71e3210c5f4e1db (diff)
downloadframeworks_base-280a64e793d081847c5dcea23ed9be38aa5332d2.zip
frameworks_base-280a64e793d081847c5dcea23ed9be38aa5332d2.tar.gz
frameworks_base-280a64e793d081847c5dcea23ed9be38aa5332d2.tar.bz2
Improve tracking of screen on reasons.
- New screen on app op to record the last time each app has caused the screen to be turned on. - New battery stats event that tells us the reason the screen has been asked to turn on. - Propagate out power manager API to specify the reason a caller is asking to have the screen turned on. Note that currently the window flag to turn the screen on bypasses much of this because it is being handled in the window manager by just directly telling the power manager to turn the screen on. To make this better we need a new API where it can specify who it is calling the API for. Change-Id: I667e56cb1f80508d054da004db667efbcc22e971
Diffstat (limited to 'cmds')
-rw-r--r--cmds/svc/src/com/android/commands/svc/PowerCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/svc/src/com/android/commands/svc/PowerCommand.java b/cmds/svc/src/com/android/commands/svc/PowerCommand.java
index da8586c..2754f2d 100644
--- a/cmds/svc/src/com/android/commands/svc/PowerCommand.java
+++ b/cmds/svc/src/com/android/commands/svc/PowerCommand.java
@@ -70,7 +70,7 @@ public class PowerCommand extends Svc.Command {
if (val != 0) {
// if the request is not to set it to false, wake up the screen so that
// it can stay on as requested
- pm.wakeUp(SystemClock.uptimeMillis());
+ pm.wakeUp(SystemClock.uptimeMillis(), "PowerCommand", null);
}
pm.setStayOnSetting(val);
}