History log of /frameworks/base/services/core/java/com/android/server/dreams/DreamController.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3edf5272fb2185403dfe64b9722b9fc9b9de80f8 15-Aug-2014 Jeff Brown <jeffbrown@google.com> Add trace tag for power management.

Instrumented the basic power manager state transitions,
calling into the Power HAL, setting the display power mode,
and setting the backlight.

Bug: 17004602
Change-Id: I4e362162ddfd7292a7eea8b5d029ce3f6593c4a9
/frameworks/base/services/core/java/com/android/server/dreams/DreamController.java
f6d466895b74d620d646abbec1c8911f3a0ce0bb 18-Jul-2014 Jeff Brown <jeffbrown@google.com> Allow dreams to wake up gently.

This change adds a new DreamService.wakeUp() method to allow a
dream to wake itself up gently and perform a transition before
finally finishing. The power manager will ask a dream to wake
up gently in most cases but may force it to happen immediately
when necessary.

If the dream takes too long to finish itself then the dream
controller will douse it with water summarily after 5 seconds.

Change-Id: Ib0564c5650cd5a454e1acc5aa91fe46995eecfa7
/frameworks/base/services/core/java/com/android/server/dreams/DreamController.java
2687550272ba061448f5d5b914700dc335299ee7 31-Jan-2014 Jeff Brown <jeffbrown@google.com> Add a new "doze mode" based on Dream components.

When a doze component has been specified in a config.xml resource
overlay, the power manager will try to start a preconfigured dream
whenever it would have otherwise gone to sleep and turned the
screen off. The dream should render whatever it intends to show
then call startDozing() to tell the power manager to put the display
into a low power "doze" state and allow the application processor
to be suspended. The dream may wake up periodically using the
alarm manager or other features to update the contents of the display.

Added several new config.xml resources related to dreams and dozing.
In particular for dozing there are two new resources that pertain to
decoupling auto-suspend mode and interactive mode from the display
state. This is a requirement to enable the application processor
and other components to be suspended while dozing. Most devices
do not support these features today.

Consolidated the power manager's NAPPING and DREAMING states into one
to simplify the logic. The NAPPING state was mostly superfluous
and simply indicated that the power manager should attempt to start
a new dream. This state is now tracked in the mSandmanSummoned field.

Added a new DOZING state which is analoguous to DREAMING. The normal
state transition is now: AWAKE -> DREAMING -> DOZING -> ASLEEP.
The PowerManager.goToSleep() method now enters the DOZING state instead
of immediately going to sleep.

While in the doze state, the screen remains on. However, we actually
tell the rest of the system that the screen is off. This is somewhat
unfortunate but much of the system makes inappropriate assumptions
about what it means for the screen to be on or off. In particular,
screen on is usually taken to indicate an interactive state where
the user is present but that's not at all true for dozing (and is
only sometimes true while dreaming). We will probably need to add
some more precise externally visible states at some point.

The DozeHardware interface encapsulates a generic microcontroller
interface to allow a doze dream for off-loading rendering or other
functions while dozing. If the device possesses an MCU HAL for dozing
then it is exposed to the DreamService here.

Removed a number of catch blocks in DreamService that caught Throwable
and attempted to cause the dream to finish itself. We actually just
want to let the process crash. Cleanup will happen automatically if
needed. Catching these exceptions results in mysterious undefined
behavior and broken dreams.

Bug: 12494706
Change-Id: Ie78336b37dde7250d1ce65b3d367879e3bfb2b8b
/frameworks/base/services/core/java/com/android/server/dreams/DreamController.java
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/dreams/DreamController.java