• Home
  • History
  • Annotate
  • only in /frameworks/base/core/java/android/service/
History log of /frameworks/base/core/java/android/service/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a381d375f37fa8fb4c606a5ba9b3e105f6e1ef1c 26-Jul-2013 John Spurlock <jspurlock@google.com> StatusBarNotification cleanup.

Remove obsolete ctor and obsolete accessor comment.

Change-Id: Ib72abc8fbd2a5f9a1b82da986094667f39e0bf62
otification/StatusBarNotification.java
c133ab8258f8e976f402d57456b1f06d11a78b03 10-Jun-2013 John Spurlock <jspurlock@google.com> Log errors found in notification listener callbacks.

Otherwise, exceptions thrown inside listener callbacks are
not logged at all.

Change-Id: Iaef28e06abc4d6caf66051725e14a17ac954173e
otification/NotificationListenerService.java
26510320646339fc59e01d392f96efeeac6d91dd 23-May-2013 Scott Main <smain@google.com> fix javadoc links.
turns out, without parameters, javadoc will link to the best matching
method signature, even if it's from the superclass. So these were pointing
to Object.nofify()

Change-Id: I13688f2b65e898d1f000a34c88d0aaed928884b5
otification/StatusBarNotification.java
04667dae3a5e45257c12d11dbcb4fc353a18d842 26-Apr-2013 Scott Main <smain@google.com> fix javadoc build
also add some docs to the service

Change-Id: I712710de403bc000c0a69a2de726bace6e7873bd
otification/NotificationListenerService.java
4f91efdf421e354ee2033ed640e4150cf0cef21b 25-Apr-2013 Daniel Sandler <dsandler@android.com> API: getPkg() -> getPackageName()

Bug: 8656860
Change-Id: If3062b9fc00270e5f0ecfe67e593b9a28c6bccdd
otification/StatusBarNotification.java
e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0 25-Apr-2013 Daniel Sandler <dsandler@android.com> API cleanup: NotificationListener

- Wrap all public member variables in getters and make
slots private
- Rename clear* methods to cancel* to be more consistent
with existing public Notification API

Bug: 8656860
Change-Id: I84f7e71fbb627f859352a93089c6a531b44dac95
otification/NotificationListenerService.java
otification/StatusBarNotification.java
25cf8cee6f304a286d321204e448b18ce733a60c 24-Apr-2013 Daniel Sandler <dsandler@android.com> New NotificationListener API: getActiveNotifications()

This allows a listener service to catch up on the current
state of the notification panel at any time, including at
startup.

Bug: 8656860
Change-Id: I1a3d665d84576e17870929a63dda334afc696010
otification/NotificationListenerService.java
1a497d3a2b1496c12949e47e55f8e46d8f585be5 18-Apr-2013 Daniel Sandler <dsandler@android.com> Fix concurrency issues when parceling StatusBarNotifications.

Protip: Don't mess with Bundles after you've sent them off
for parceling in an RPC.

Note that this change reduces the payload size of
StatusBarNotification objects received in
onNotificationRemoved() callbacks; it scrubs out the
RemoteViews and Bitmaps just as the NoMan's internal archive
does. [You don't really need that information anyway when
hearing about a removed notification; most likely all you
need are the other slots on StatusBarNotification, but
nulling the whole Notification object breaks a lot of
clients.]

Bug: 8616295
Change-Id: Ic899045f2352b96dcf064d3e9e51dad52629aea3
otification/NotificationListenerService.java
otification/StatusBarNotification.java
3a2854bcee08e3af3ca1b042c1fef6ca68f8c70a 09-Apr-2013 Jeff Brown <jeffbrown@google.com> Merge "Queues, queues, queues and input." into jb-mr2-dev
f9e989d5f09e72f5c9a59d713521f37d3fdd93dd 05-Apr-2013 Jeff Brown <jeffbrown@google.com> Queues, queues, queues and input.

Redesigned how ViewRootImpl delivers input events to views,
the IME and to native activities to fix several issues.

The prior change to make IME input event delegation use
InputChannels failed to take into account that InputMethodManager
is a singleton attached to the main looper whereas UI may be
attached to any looper. Consequently interactions with the
InputChannel might occur on the wrong thread. Fixed this
problem by checking the current thread and posting input
events or callbacks to the correct looper when necessary.

NativeActivity has also been broken for a while because the
default event handling logic for joysticks and touch navigation
was unable to dispatch events back into the native activity.
In particular, this meant that DPad synthesis from touch navigation
would not work in any native activity. The plan is to fix
this problem by passing all events through ViewRootImpl as usual
then forwarding them to native activity as needed. This should
greatly simplify IME pre-dispatch and system key handling
and make everything more robust overall.

Fixed issues related to when input events are synthesized.
In particular, added a more robust mechanism to ensure that
synthetic events are canceled appropriately when we discover
that events are no longer being resynthesized (because the
application or IME is handling or dropping them).

The new design is structured as a pipeline with a chain of
responsibility consisting of InputStage objects. Each InputStage
is responsible for some part of handling each input event
such as dispatching to the view hierarchy or to the IME.
As a stage processes an input event, it has the option of
finishing the event, forwarding the event to the next stage
or handling the event asynchronously. Some queueing logic
takes care to ensure that events are forwarded downstream in
the correct order even if they are handled out of order
by a given stage.

Cleaned up the InputMethodManager singleton initialization logic
to make it clearer that it must be attached to the main looper.
We don't actually need to pass this looper around.

Deleted the LatencyTimer class since no one uses it and we have
better ways of measuring latency these days using systrace.

Added a hidden helper to Looper to determine whether the current
thread is the indicated Looper thread.

Note: NativeActivity's IME dispatch is broken by this patch.
This will be fixed later in another patch.

Bug: 8473020
Change-Id: Iac2a1277545195a7a0137bbbdf04514c29165c60
allpaper/WallpaperService.java
5feceebb892d4cb5777cea3c6174b206705d456b 23-Mar-2013 Daniel Sandler <dsandler@android.com> New NotificationListenerService.

This is the best and only way for apps to listen for
notifications: create a NotificationListenerService, wait
for the NoMan to bind to you (as a result of the user
checking a box somewhere in Settings and agreeing to a
scary dialog box), and you'll start receiving notification
posted and dismissed callbacks. Your service, while enabled,
will also be able to clear one or all notifications.

Use this power wisely.

This change moves StatusBarNotification out of
com.android.internal into android.service.notification.
[Internal customers, including System UI and early users of
the system-only listener binder API, will need to be
updated.]

Bug: 8199624
Change-Id: I1be46f823d4b3ddc901109ec1e085cd6deb740c2
otification/INotificationListener.aidl
otification/NotificationListenerService.java
otification/StatusBarNotification.aidl
otification/StatusBarNotification.java
c4aad01cbbb69c916ef323693e1fd0560b0eccba 23-Feb-2013 Dianne Hackborn <hackbod@google.com> Formalize overscan metrics.

The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets. This is used to correctly
position the various UI elements in the various combination
of layout options. In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).

Okay, maybe that is not written so clearly. Well, it made
my head hurt too, so suffer!

The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area. The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.

Also did some improvements to debug dumping in the window
manager.

Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
allpaper/WallpaperService.java
b84b9c21919a067ee989f70667c1cfa2f817c46e 11-Dec-2012 Mita Yun <mitayun@google.com> am 81f82d29: am aa8dc2ee: Removed mCallbackLooper from WallpaperService

* commit '81f82d29ed3c93704c4fa0cbfeb48a675b71c349':
Removed mCallbackLooper from WallpaperService
aa8dc2ee18c15a5c7fb897d2f41116950fd30fe6 11-Dec-2012 Mita Yun <mitayun@google.com> Removed mCallbackLooper from WallpaperService

Change-Id: Icb060a9225dbe7e848bbe80e6a9ab28fcfb59969
allpaper/WallpaperService.java
d44280e28884085f014806d53413ec5a68d0ac25 11-Dec-2012 Mita Yun <mitayun@google.com> resolved conflicts for merge of ebcbfb3f to master

Change-Id: I0658dd4a1418fbad91d9663e5b52418a979dc683
ed218c706d9e91e75b94c448cee2e6150aaee57f 07-Dec-2012 Mita Yun <mitayun@google.com> Use asynchronous messages for input method events.

Improves the throughput of IME event handling by ensuring that
input events do not get serialized behind UI traversal and
drawing messages such as when the UI is animating.

Added support for creating an asynchronous Handler as part of a
HandlerCaller. It turns out we should be using an asynchronous
Handler not only in IME dispatch but also in accessibility and
wallpaper events where HandlerCaller is used. So fixed those
services to also use an asynchronous Handler.

Change-Id: I0b19140c9d5ca6ee300c1a150c48312fd55ed8eb
allpaper/WallpaperService.java
ce4a9a34b68ab04ab176d59e7562f520d0267b79 28-Nov-2012 Scott Main <smain@google.com> am 33a8b28f: am 1cc041f7: am 7538ff09: am 35473e6e: Merge "docs: update dreamservice description" into jb-mr1-dev

* commit '33a8b28f04ae689f3d5e24ef46df1dea76be602b':
docs: update dreamservice description
6c9a1a1004f224e771139aec6fd2058aa6bdccbd 19-Nov-2012 Scott Main <smain@google.com> docs: update dreamservice description

Change-Id: I7e7295a3d67ca1760ba52b3958bf91540692e542
reams/DreamService.java
b1ef36965bf17e791afd16a9a34bcbb32f495f68 17-Nov-2012 Craig Mautner <cmautner@google.com> Refactor unused methods and unnecessary members.

ImageWallpaper runs on the main thread now and doesn't need to add
callbacks on different threads or lock against concurrent access.

Bug 7326921 fixed.

Change-Id: I6097e1dff8af743a4fb81b697efee0e02667125b
allpaper/WallpaperService.java
ed108f3d125b0a4cc465057e3514caf781cdea19 18-Oct-2012 John Spurlock <jspurlock@google.com> Frameworks base: Promote dream setting defaults to config.

So that:
- the values can be shared (to fix assoc bug)
- the values can be customized in product overlays

Bug:7373284
Change-Id: I37f037082523a3d975f6014f36afa28c60117372
reams/Sandman.java
6237ac19bf4eed261e8b0c69fac774581b4ea02b 09-Oct-2012 Scott Main <smain@google.com> improve some docs for dreams

Change-Id: I7652f4366cdc8c40926d7961582663cc99ca0735
reams/DreamService.java
4a01f2b5dcb5bcb72358905db402731013195cfd 15-Oct-2012 Chris Wren <cwren@android.com> Merge "delay onDreamingStarted() to work around asynchrony." into jb-mr1-dev
f434d23a16b34e7815049db29bbcd0cd8a4e4862 11-Oct-2012 Chris Wren <cwren@android.com> delay onDreamingStarted() to work around asynchrony.

Bug: 7328682
Change-Id: I86144b0b34eade332543244bb3aff5f9695ff7f7
reams/DreamService.java
11159e9a785a143c9f3765bdf5a5ccfd77842d7a 12-Oct-2012 Jeff Brown <jeffbrown@google.com> Do not launch Somnambulator as a dock app.

Fixes a black flash that occurred when the device was docked
because the UiModeManagerService was launching the Somnambulator
to start the dream when docked. This caused an unnecessary
activity transition and could in fact make dreaming less
reliable than if the UiModeManagerService started the dream itself.

Moved common code from UiModeManagerService and Somnambulator
to Sandman to ensure it is kept in sync.

Bug: 7328545
Change-Id: I46102784e2ab1acc0241d43a48abf0581278af24
reams/Sandman.java
6918d9f970989f1e5ca5a03b04d10a4c890721e9 11-Oct-2012 Daniel Sandler <dsandler@android.com> Merge "Remove Dream windows immediately." into jb-mr1-dev
c13107046acfcda7e3402a56a617818b7e77e1b8 10-Oct-2012 Daniel Sandler <dsandler@android.com> Remove Dream windows immediately.

Ensures that onDetachedFromWindow happens before onDestroy.

Bug: 7295929
Change-Id: Ic4ac2552bfce75a5dc43dc840e6ef0182369e24b
reams/DreamService.java
a934fd142ec59b297b31c1f0b664e0c0d5e61eba 09-Oct-2012 Chris Wren <cwren@android.com> default the screen on during the dream.

Bug: 7295909
Change-Id: Ic629bd08bdade8dba2b92124c56cab1bb438bec2
reams/DreamService.java
4c1e3183baf39ab69c0289c1511877a8bb0b0f75 06-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7296314, issue #7296314.

7296314 Crashing dreams are stuck
7296510 Transition from lock screen to dreaming is really bad

The window layer for dreams is now moved down below the keyguard,
so that some of the expected stuff like crash and ANR dialogs can
be seen on top of them. While doing this, I reorganized how we
define the layers so the constants are just in the switch statement,
so it is much less crazy-making trying to read how things go
together.

We now have some special cases for when a dream is being shown
to turn off its animation if the keyguard is currently shown.
Since we know it will be hiding the keyguard we need it to be
shown immediately so that you don't see whatever is behind it.

Cleaned up some handling of when the lock screen is displayed
while a FLAG_SHOW_WHEN_LOCKED window is displayed, so that the
lockscreen doesn't transiently get shown and mess up the fullscreen
or system UI state. This also fixes problems with any normal
activity that is doing this.

Hid the methods on DreamService for setting lights out mode. It
doesn't make sense to have such methods on DreamService, because
you can just as well do that on your own View that is showing the
dream content, and when you can do that you can fully participate
in the (required) interactions about it such as being told when
the mode goes away.

The DreamService method for going fullscreen now uses the window
flag for doing this, which is what you want, because you want this
state to persistent on that window and not get knocked out if
something above the window tickles the system UI state.

Also fixed the problem where dreams that hid the status bar would
have a jerky animation when going away, since they were causing the
activity behind them to be layed out without the lock screen. This
is a kind-of ugly special case in the window manager right now to
just not layout windows that are behind a dream. Good enough for MR1.

Change-Id: Ied2ab86ae068b1db0ff5973882f6d17b515edbcd
reams/DreamService.java
7ef38ea9e5ee1d2fd58e818f37191a589793e236 05-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7275122: Wall paper jank when switching users" into jb-mr1-dev
bce0cbb40d060f71a7de86d5668eb690e7073c19 05-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7275122: Wall paper jank when switching users

Change-Id: I2677c7641a01b4afe89db29cb5fc1af876f9d078
allpaper/WallpaperService.java
2d78490292090eeab84694330978c9ad7fad2d37 04-Oct-2012 Daniel Sandler <dsandler@android.com> DreamService API revisions.

Reduce reliance on Service interface overrides, instead
steering clients to the DreamService-specific lifecycle
hooks:

onAttachedToWindow .. onDreamingStarted ..
onDreamingStopped .. onDetachedFromWindow

The old Dream.java is finally gone now too.

Bug: 7281802
Change-Id: Ib7802c3397fde60ad1132fa49831da182eef4d7a
reams/Dream.java
reams/DreamService.java
reams/IDreamService.aidl
3a4d41a654bf00972da9013854ba0e15b2c01fe9 01-Oct-2012 John Spurlock <jspurlock@google.com> Update javadocs for DreamService.

Reflect the new intent-filter protocol, and add a bit about <dream>.
Also escape xml so it's visible in generated html.

Bug:7256474
Change-Id: Id270eeb70601b492458834f19216801b428af4cb
reams/DreamService.java
be87e2f5885b28145a788fd31d1fb5ae88a71100 29-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7255954: API Review: rename Dream to DreamService

Change-Id: I89ecf2c3ec4fef09c0495aa68de11576f9cfd872
reams/Dream.java
reams/DreamService.java
62c82e4d92cc0b856059f905d81885f7808a0e7d 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Make DreamManagerService more robust.

Clearly isolated the DreamManagerService and DreamController
responsibilities. DreamManagerService contains just enough logic to
manage the global synchronous behaviors. All of the asynchronous
behaviors are in DreamController.

Added a new PowerManager function called nap() to request the device
to start napping. If it is a good time to nap, then the
PowerManagerService will call startDream() on the DreamManagerService
to start dreaming.

Fixed a possible multi-user issue by explicitly tracking for
which user a dream service is being started and stopping dreams
when the current user changes. The user id is also passed to
bindService() to ensure that the dream has the right environment.

Fix interactions with docks and the UI mode manager. It is
important that we always send the ACTION_DOCK_EVENT broadcast
to the system so that it can configure audio routing and the like.
When docked, the UI mode manager starts a dock app if there is
one, otherwise it starts a dream.

This change resolves issues with dreams started for reasons other
than a user activity timeout.

Bug: 7204211
Change-Id: I3193cc8190982c0836319176fa2e9c4dcad9c01f
reams/Dream.java
reams/IDreamManager.aidl
f41f505fac0ba31159d3cdba3ca9e0c00bc3fe9b 26-Sep-2012 John Spurlock <jspurlock@google.com> Dream metadata now specified using an xml-resource.

Removed old metadata key for dream settings activity, now defined in attrs.xml.

Also took this opportunity to remove Dream#lightsOut.

Bug:7172816
Bug:7211867
Change-Id: Ied18a527d2dc2aacc19d7a9543f090653232f0ed
reams/Dream.java
5e416d88032a8f79a20a8052187ee8f24d8c9c02 21-Sep-2012 John Spurlock <jspurlock@google.com> Fix javadocs to fix build.

Change-Id: I6d7d63b9322f225124f722a245c1222540afbff4
reams/Dream.java
d5c582c494deac518c85682dc28728c2fadae8da 21-Sep-2012 John Spurlock <jspurlock@google.com> Additions to Dream public api.

- lightsOut() -> setLightsOut(boolean)
(deprecated lightsOut, will remove once all baked-in dreams are updated)
- Added ability to keep the screen bright (default = false).
- Lights out is now true by default.
- Consistent setters(setXxx) + getters(isXxx) for
interactive, lightsOut, fullscreen, and screenBright dream attributes.
Can set attributes at any time (even before window is created).
- Fleshed out javadocs for public api.
- Reordered things a bit.
- Added example of manifest dream declaration ready for copypasta.
- Removed unused action constant, added category constant.

Bug:7172816
Bug:7111868
Change-Id: I721db7a1a5e5ad047a3723b4d5141ef53b0970af
reams/Dream.java
f4f6b4c8b0fcf77d46567f13b409255948fe107b 25-Aug-2012 John Spurlock <jspurlock@google.com> Fire "dreaming started" and "dreaming stopped" broadcasts.

Dream manager now fires broadcast intents when entering + exiting
dreamland (except when testing).

Power manager can now listen for dreams ending, using polling only
as a backstop.

Also:
- Bullet-proof dream-manager/dream against known failure modes
- Add new read/write dream permissions
- Refactor dream-manager to delegate work + state management into
a new DreamController class, via a handler

Bug:6999949
Bug:7152024
Change-Id: I986bb7812209d8c95ae1d660a5eee5998a7b08b1
reams/Dream.java
reams/DreamManagerService.java
reams/IDreamManager.aidl
5dc5a00e7ebadc085ded7e29feacd17e53698486 16-Sep-2012 Dianne Hackborn <hackbod@google.com> More multi-user stuff.

- New public APIs to find out when a user goes to the foreground,
background, and is first initializing.
- New activity manager callback to be involved in the user switch
process, allowing other services to let it know when it is safe
to stop freezing the screen.
- Wallpaper service now implements this to handle its user switch,
telling the activity manager when it is done. (Currently this is
only handling the old wallpaper going away, we need a little more
work to correctly wait for the new wallpaper to get added.)
- Lock screen now implements the callback to do its user switch. It
also now locks itself when this happens, instead of relying on
some other entity making sure it is locked.
- Pre-boot broadcasts now go to all users.
- WallpaperManager now has an API to find out if a named wallpaper is
in use by any users.

Change-Id: I27877aef1d82126c0a1428c3d1861619ee5f8653
allpaper/IWallpaperConnection.aidl
allpaper/WallpaperService.java
9f750af6c178d8abb5c12d34efba599e3d53aea4 10-Sep-2012 John Spurlock <jspurlock@google.com> Update the dream manager to be multi-user aware.

Dream settings are stored per-user, so dream manager operations
must act according to the calling or current user.

Bug:7041514
Change-Id: I4a0bbbd76886e6440b1afd89c61af5f4569b0e18
reams/DreamManagerService.java
4fde81f7e70da4d2b84f8d60c738cad885663dec 25-Aug-2012 John Spurlock <jspurlock@google.com> DreamManagerService: Handle missing db value

Should not happen (except for early dogfooders with a specific build),
but handle gracefully as we do elsewhere in dream manager.

To test:
adb shell sqlite3 \
/data/data/com.android.providers.settings/databases/settings.db \
"delete from secure where name = 'screensaver_components'"

Pre-fix workaround:
adb shell sqlite3 \
/data/data/com.android.providers.settings/databases/settings.db \
"insert into secure(name, value) values ('screensaver_components', \
'com.google.android.deskclock/com.android.deskclock.Screensaver')"

Change-Id: I2cf39608c8dd5011f6a00deece95eb6554da5173
reams/DreamManagerService.java
1a868b7981ca5f52e893fdf9f8f538c9d5ce241d 22-Aug-2012 John Spurlock <jspurlock@google.com> Add framework support for multiple dreams.

Bug:7028665
Change-Id: I4fba6b8e39dc07af4490c621ac3bc7b3867371b2
reams/Dream.java
reams/DreamManagerService.java
reams/IDreamManager.aidl
98365d7663cbd82979a5700faf0050220b01084d 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Refactor for multi-display support.

Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.

Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).

Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.

Add stubs for some new display manager API features.

Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.

Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
reams/DreamManagerService.java
allpaper/WallpaperService.java
9630704ed3b265f008a8f64ec60a33cf9dcd3345 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Power manager rewrite.

The major goal of this rewrite is to make it easier to implement
power management policies correctly. According, the new
implementation primarily uses state-based rather than event-based
triggers for applying changes to the current power state.

For example, when an application requests that the proximity
sensor be used to manage the screen state (by way of a wake lock),
the power manager makes note of the fact that the set of
wake locks changed. Then it executes a common update function
that recalculates the entire state, first looking at wake locks,
then considering user activity, and eventually determining whether
the screen should be turned on or off. At this point it may
make a request to a component called the DisplayPowerController
to asynchronously update the display's powe state. Likewise,
DisplayPowerController makes note of the updated power request
and schedules its own update function to figure out what needs
to be changed.

The big benefit of this approach is that it's easy to mutate
multiple properties of the power state simultaneously then
apply their joint effects together all at once. Transitions
between states are detected and resolved by the update in
a consistent manner.

The new power manager service has is implemented as a set of
loosely coupled components. For the most part, information
only flows one way through these components (by issuing a
request to that component) although some components support
sending a message back to indicate when the work has been
completed. For example, the DisplayPowerController posts
a callback runnable asynchronously to tell the PowerManagerService
when the display is ready. An important feature of this
approach is that each component neatly encapsulates its
state and maintains its own invariants. Moreover, we do
not need to worry about deadlocks or awkward mutual exclusion
semantics because most of the requests are asynchronous.

The benefits of this design are especially apparent in
the implementation of the screen on / off and brightness
control animations which are able to take advantage of
framework features like properties, ObjectAnimator
and Choreographer.

The screen on / off animation is now the responsibility
of the power manager (instead of surface flinger). This change
makes it much easier to ensure that the animation is properly
coordinated with other power state changes and eliminates
the cause of race conditions in the older implementation.

The because of the userActivity() function has been changed
so that it never wakes the device from sleep. This change
removes ambiguity around forcing or disabling user activity
for various purposes. To wake the device, use wakeUp().
To put it to sleep, use goToSleep(). Simple.

The power manager service interface and API has been significantly
simplified and consolidated. Also fixed some inconsistencies
related to how the minimum and maximum screen brightness setting
was presented in brightness control widgets and enforced behind
the scenes.

At present the following features are implemented:

- Wake locks.
- User activity.
- Wake up / go to sleep.
- Power state broadcasts.
- Battery stats and event log notifications.
- Dreams.
- Proximity screen off.
- Animated screen on / off transitions.
- Auto-dimming.
- Auto-brightness control for the screen backlight with
different timeouts for ramping up versus ramping down.
- Auto-on when plugged or unplugged.
- Stay on when plugged.
- Device administration maximum user activity timeout.
- Application controlled brightness via window manager.

The following features are not yet implemented:

- Reduced user activity timeout for the key guard.
- Reduced user activity timeout for the phone application.
- Coordinating screen on barriers with the window manager.
- Preventing auto-rotation during power state changes.
- Auto-brightness adjustment setting (feature was disabled
in previous version of the power manager service pending
an improved UI design so leaving it out for now).
- Interpolated brightness control (a proposed new scheme
for more compactly specifying auto-brightness levels
in config.xml).
- Button / keyboard backlight control.
- Change window manager to associated WorkSource with
KEEP_SCREEN_ON_FLAG wake lock instead of talking
directly to the battery stats service.
- Optionally support animating screen brightness when
turning on/off instead of playing electron beam animation
(config_animateScreenLights).

Change-Id: I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
reams/DreamManagerService.java
f7178d3cadfeb0101491eeea7d7f3b0d7c26dbe6 10-Aug-2012 Daniel Sandler <dsandler@android.com> Allow the secure keyguard to engage behind Dreams.

TYPE_DREAM windows are now considered for relevant window
flags alongside application windows.

Bug: 6961616
Change-Id: Idee3303276a8b69c7f07de1d6acdce64c6e1b863
reams/Dream.java
9252dbd314bbce75f1e57330c5a911c9f6428cf5 10-Aug-2012 Daniel Sandler <dsandler@android.com> Add fullscreen to Dream.lightsOut().

Also don't go into lightsOut() by default in
onAttachedToWindow(), in case some dream doesn't want to do
that.

We should probably make this even more flexible, but
this is a start.

Change-Id: I606b42a288259902e89d59595ad60548a89866da
reams/Dream.java
a2fbe53f1e59a9b015d27213fbc8588883f4d408 10-Aug-2012 Daniel Sandler <dsandler@android.com> More termination conditions for Dreams.

Default implementation of Dreams will finish() on KEYCODE_BACK.

PhoneStatusBar will awaken() from any Dream when the Home key is pressed.

Change-Id: I55e2a5d533a7fb93debc4c54514dba3b9098f009
reams/Dream.java
5927d957ea36744315e958ab4a9a1f095d48721c 08-Aug-2012 Daniel Sandler <dsandler@android.com> Merge "Migrate Dreams default settings to DatabaseHelper." into jb-mr1-dev
fdb7c36a108e6a7887de6611b3f1541e3009f2d5 06-Aug-2012 Daniel Sandler <dsandler@android.com> Migrate Dreams default settings to DatabaseHelper.

Also switch Dreams on for all charging devices by default.

Change-Id: Iccbcc2906d55214320b2f467e88ba9cb188f4886
reams/DreamManagerService.java
758143ecfedbe08cc6c4fed0ad8ad7a854194ca4 07-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Window position not reported if the window is not moved.

1.If a window is shown but never moved the window window
is never notified for its current location. Therefore,
accessibility nodes do not contain correct bounds in
screen coordinates.

bug:6926295

Change-Id: I7df18b095d33ecafffced75aba9e4f4693b0c393
allpaper/WallpaperService.java
bc632a28e4fba4a659baf39b9fd3d06d10cfda97 31-Jul-2012 John Spurlock <jspurlock@google.com> Re-enable dreams: frameworks/base

Enable feature in config. Expose Dream in public api for unbundled apps.
Unhide package. Add isDreaming() method to service.

Re-arrange the Dream api a bit. (use onStart as hook for subclasses).
Coordinate properly with power manager.

Replace old dock mode (don't fire old intent).

Change-Id: I1318d20cc1613e5d862f2913f2fcdc9719302cf7
Bug: 6921930
reams/Dream.java
reams/DreamManagerService.java
reams/IDreamManager.aidl
6881a10557acf3b0270de54799d6f19437acf584 27-Jul-2012 Craig Mautner <cmautner@google.com> Small step towards supporting multiple displays

Change-Id: I353449c2b464394988c7e0203656b5851a0c9127
allpaper/WallpaperService.java
aac0d4ed026d1cfbcf3fa81c6e4eb96f4347ca17 20-Jul-2012 Fabrice Di Meglio <fdimeglio@google.com> Replace left/right with start/end for Gravity / LayoutParams / Padding

- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: Id9af5375fb9b0edeae5232c77e52ecd497bd2e67
allpaper/WallpaperService.java
5702d4dfb5b81491f873a3617f8d8fc8dc5279e6 30-Jun-2012 Craig Mautner <cmautner@google.com> Notify client side of window movement.

Add a one way method to notify Views that the window has moved
on the screen. Fixes issues arising from the IME popping up and
translating the window that uses it. Accessibility was left unaware
of these movements and was drawing the box around the wrong widgets.
Similarly PopupWindow used getLocationOnScreen to determine how
much screen real estate was above and below the anchor point to
determine where to put an anchored window.

Fixes bug 6623031.

Change-Id: I4731a94d5424c1ec77bf1729fba8fc9ea34cae46
allpaper/WallpaperService.java
85afd1b6f871d471fdff1980134676a5f1690525 13-May-2012 Dianne Hackborn <hackbod@google.com> Implement new window cropping.

The window manager now performs the crop internally, evaluating
it every animation from, to be able to update it along with
the surface position.

Change-Id: I960a2161b9defb6fba4840fa35aee4e411c39b32
allpaper/WallpaperService.java
c33208fe72662fd89b75e996dbd495237a0021d4 07-May-2012 satok <satok@google.com> Spell check the first word of the sentence

Change-Id: I7803d92de8f4ea399cef5c2d1ddf5396d59ef2cf
extservice/SpellCheckerService.java
5c58de3a523a384c47b0b1e0f5dd9728a74cd9f7 29-Apr-2012 Dianne Hackborn <hackbod@google.com> Add system insets to windows.

This will be used to determine which parts of a window a completely
hidden by system UI elements (status bar, nav bar, system bar) so
that they can be clipped out from rendering.

Change-Id: I2c6c6ac67dbdfeed82d2c089ef806fb483165bd9
allpaper/WallpaperService.java
eb4cc492c93ab9635dde78b958a834120412e72a 27-Apr-2012 Jeff Sharkey <jsharkey@android.com> Protect system services with DUMP permission.

Change-Id: I5e53859f8b8e5473e54eca43ebd7de841f1a05ff
reams/DreamManagerService.java
35be7560300a97fc3675bdd325910f28827d9508 19-Apr-2012 Jeff Sharkey <jsharkey@android.com> Move SystemUI out of system UID.

Add permissions for various things it pokes. Create new permission
to control launching non-exported activities from recents. Hidden
API to relax WallpaperService checks.

Change-Id: I547fdcd7c213dd153ae101533ce7c56cd8f86a0d
allpaper/WallpaperService.java
c7ee1b9369ffd7c21a70738056a82dc4238e7fc1 11-Apr-2012 satok <satok@google.com> Get rid of "isSentenceLevelSpellCheckSupported"

Bug: 6320351
Change-Id: I0e931b7248f8c65268b60af599c07432d58d2f1f
extservice/SpellCheckerService.java
7d276c377ce0c56630c06a6da431a6cb9bd76d1e 30-Jan-2012 Daniel Sandler <dsandler@android.com> New Android Dreams architecture, disabled for now.

Rather than normal Activities (which have a host of problems
when used for this purpose), screen savers are now a
special kind of Service that can add views to its own
special window (TYPE_DREAM, in the SCREENSAVER layer).

Dreams are now launched by the power manager; whenever it is
about to turn the screen off, it asks the window manager if
it wants to run a screen saver instead. (http://b/5677408)

Also, the new config_enableDreams bool allows the entire
feature to be switched on or off in one place. It is
currently switched off (and the APIs are all @hidden).

Change-Id: Idfe9d430568471d15f4b463cb70586a899a331f7
reams/Dream.java
reams/DreamManagerService.java
reams/IDreamManager.aidl
reams/IDreamService.aidl
431ea84e1fde20139b748a4818c44e85a715e155 29-Mar-2012 satok <satok@google.com> Add document to SpellCheckerService

Bug: 6136149

Change-Id: I93f0127878372006a240a9a34823f873bcc09927
extservice/SpellCheckerService.java
6183cd64a98a69ea247813c9ba0a07326c4bc1ae 26-Mar-2012 satok <satok@google.com> Take sentence-level spell checking APIs public

Bug: 6136149

Change-Id: I772164d9c67e95876c228efcce2356a81a06be4f
extservice/SpellCheckerService.java
d404fe110558bd2e1960b428db6a2ee8bfd040cd 21-Feb-2012 satok <satok@google.com> Refactor sentence level spell checking APIs

Support sentence level spell checking APIs: Step 1

Change-Id: I31c0b88e7885f33a0694ab60b8f2dbceeffe42f1
extservice/SpellCheckerService.java
b5052de75736527549d7e537632777c6fec2e4f0 14-Dec-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of a80bab37 to master

Change-Id: Id71cc68a617e1ea0dd2f3932d454be6dba336eef
33b8ee509f36a0168c8ce5a9091b57ab936f4c13 14-Dec-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5756204: Crespo IME briefly appears shortened when...

...rotating to landscape

When doing spell checking in the same process as the spell checker, we
need to make sure it is still done asynchronously.

Putting this in I noticed quite a few threading issues in this code, so
I also addressed those (which became very obviously a problem with the
async stuff here now).

Also tweaked the service side to run spell checking at background priority.

Change-Id: I01bafe3bec6bceeca911d6bf2f61a486a2fd4c48
extservice/SpellCheckerService.java
32cbc3855c2a971aa5a801fd339fb6a37db91a1a 01-Dec-2011 Jeff Brown <jeffbrown@google.com> Refactor InputQueue as InputEventReceiver.

This change simplifies the code associated with receiving input
events from input channels and makes it more robust. It also
does a better job of ensuring that input events are properly
recycled (sometimes we dropped them on the floor).

This change also adds a sequence number to all events, which is
handy for determining whether we are looking at the same event or a
new one, particularly when events are recycled.

Change-Id: I4ebd88f73b5f77f3e150778cd550e7f91956aac2
allpaper/WallpaperService.java
4952dfd16a0f839559ffa78f5016394caf85294f 01-Dec-2011 Jeff Brown <jeffbrown@google.com> Ensure input events are processed in-order in the application.

As it turns out, it used to be possible for there to be multiple
input events simultaneously in flight in an application. Although
it worked, it made it hard to reason about what was going on.
The problem was somewhat exacerbated by the introduction of a
queue of "InputEventMessage" objects as part of an earlier latency
optimization.

This change restores order from chaos and greatly simplifies the
invariants related to input event dispatch within the application.

Change-Id: I6de5fe61c1fe2ac3dd33edf770d949044df8a019
allpaper/WallpaperService.java
c0b7f65ae0594e19d1272e5caf2d83638041d19c 29-Nov-2011 Dianne Hackborn <hackbod@google.com> am 496f6e2a: am b54980d1: Merge "Fix issue #5588689: Black camera preview after coming back from gmail" into ics-mr1

* commit '496f6e2ad656c5bb8a277e191554d16abd290b58':
Fix issue #5588689: Black camera preview after coming back from gmail
6d05fd3c795088ac60f86382df5a66d631e8a0cb 19-Nov-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5588689: Black camera preview after coming back from gmail

Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.

Also a small tweak to allow windows that have a wallpaper background
to still have a preview window. This makes launching home after it
has been killed feel much more responsive.

Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
allpaper/WallpaperService.java
0dc1f648a09b46c45190ba1ce7daecf7fada4347 18-Nov-2011 satok <satok@google.com> add sentence level spell checker hidden apis

Change-Id: If65c89044bed064fd01a554e33176f64f7c21c0f
extservice/SpellCheckerService.java
74061ff90453c79ddbde468f630a41425da07710 02-Nov-2011 satok <satok@google.com> Fix a memory leak of a Binder in SpellCheckerService

Bug: 5499490

Change-Id: I167a3e9dfdd6edd06c6ad993fbff3a535c81b09c
extservice/SpellCheckerService.java
a8e5a2bcd6a0d35893187c6df42425c03be005da 28-Oct-2011 Chet Haase <chet@google.com> Optimize handling of scrolled wallpapers

Swiping the home screen causes the WindowManagerService to do
a bunch of work to keep the wallpapers in sync. First, it lays out
and places all windows. Also, it notifies the SystemUI process that
the wallpaper position has changed.

The layout/place operation is too much work - we only need to set
the position values for the wallpaper, not relayout the whole system.

The notification mechanism must exist, but should be optional. Most
wallpapers don't care (especially static ImageWallpapers). So we'll
give them a new API (WallpaperService.Engine.setWantsOffsets()) to
allow wallpapers to opt out of this process and avoid the performance
overhead.

Change-Id: I66c38375438937f14f6f5550565b28eb204b1e06
allpaper/WallpaperService.java
182e4ae2f4bbfdd2272f6e425c6f3734b3f157bf 27-Oct-2011 satok <satok@google.com> Add a path to HelloSpellChecker sample application for SDK build

Change-Id: I77e334f8e2b50b8609b1729edb253254d6b7360b
extservice/package.html
44619d3e087138775fb19fbd5d7b9f497a0805f4 19-Oct-2011 satok <satok@google.com> Update links for SampleSpellCheckerService for I938ba499

Change-Id: I528fc5ee5f9971ecb3bf47ef1c8b999546724c1f
extservice/package.html
b22723c3f6befe5b2fb50333642818805aa8d52f 18-Oct-2011 Scott Main <smain@google.com> docs: add package summary for spell checker services

Change-Id: Iaac3293f941ec117ec28e031d5e24073e1269851
extservice/package.html
44b75030931d9c65c9e495a86d11d71da59b4429 14-Oct-2011 satok <satok@google.com> Add documents for the spell checker framework and the input method subtype

Bug: 4973788

Change-Id: I7e650f336ba1bb8949899e8b2355e6d492a2e4b2
extservice/SpellCheckerService.java
9a230e01a1237749a8a19a5de8d46531b0c8ca6a 06-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately

This cleans up how ui flags are managed between the client and window manager.
It still reports the global UI mode state to the callback, but we now only clear
certain flags when the system goes out of a state (currently this just means the
hide nav bar mode), and don't corrupt other flags in the application when the
global state changes.

Also introduces a sequence number between the app and window manager, to avoid
using bad old data coming from the app during these transitions.

Change-Id: I40bbd12d9b7b69fc0ff1c7dc0cb58a933d4dfb23
allpaper/WallpaperService.java
9fe6cb5cc2cc86a370d47afc44d27fa7086a15be 09-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5273986: The power usage of the mp3 background playback...

...increased from ~50mA to 260mA

Change-Id: I24d7188185f4ec5ff9e1f29c15472ae56c851e5e
allpaper/WallpaperService.java
117999d1f44ec3423369385495ae207898b7b73e 02-Sep-2011 satok <satok@google.com> Make the spell checker session static

Change-Id: I66d51f33e005f46465232d3fc460cda0609609ea
extservice/SpellCheckerService.java
9e4e727b4a164c17944e8ae6eb2d2532a98737f8 30-Aug-2011 Dianne Hackborn <hackbod@google.com> Fix issues #5233826 and #5209847 -- live wallpapers.

5233826 when a live wallpaper starts, it does so regardless of its visibility

The WallpaperService is now very forceful about telling a wallpaper it is
not visible when it first starts.

5209847 Make launcher turn off the wallpaper in all apps.

Fix a bug in the window manager that would not correctly handle the wallpaper
flag changing.

Change-Id: Ie3314043a84664be72a1304a1705408efd789a15
allpaper/WallpaperService.java
527de8e3de4c2bad9ba0fc0e50f8fb3f95ba4681 23-Aug-2011 Dianne Hackborn <hackbod@google.com> Debugging for issue #5180240: Wallpaper continues to consume CPU when screen off

Add debug dump to the wallpaper service.

Change-Id: I01502b10de93b6f9d2315fd66776f3f2210e6696
allpaper/WallpaperService.java
5357806980269d846a15c845a6fcc0384fb18860 03-Aug-2011 satok <satok@google.com> API cleanup for the spell checker framework

Bug: 5110151

- Add a bundle to an argment of newSpellCheckerSession
- Expose SpellCheckerSessionImpl in SpellCheckerService
- Fix function names
- etc

Change-Id: Ia8ec783b7b4d5fcd18389854b445fc10fc502297
extservice/SpellCheckerService.java
aafd955fa8f5c31c511763c0f826b6d7acf15b9c 02-Aug-2011 satok <satok@google.com> Move SpellCheckerSession

SpellCheckerSession should be in android.view.textservice because this class will be used directly by users.

Change-Id: I0df6d7958adda421312b5f641ac4459ca4739cc9
extservice/SpellCheckerSession.java
6be6d7548fb7c29a4d46dc985318ab2adf69f95f 28-Jul-2011 satok <satok@google.com> Handle the existing binds to spell checkers correctly.

Change-Id: I32efce9f8c09b5a829b0431e8c444fc54b03b440
extservice/SpellCheckerService.java
extservice/SpellCheckerSession.java
142d7575b52d03d46246e3b142e22ebc32d45a84 25-Jul-2011 satok <satok@google.com> [step4] Change service interface

Change-Id: Iaf86065a2a7f075c670ebdaa60a33a815dcb8113
extservice/SpellCheckerService.java
1bedd99761e3d2acdac947d641e7fee5db556141 23-Jul-2011 satok <satok@google.com> Tweak APIs for SpellChecker

1. Move getSupellcheckerInfo to SpellCheckerSession
2. Change the interface of getSpellCheckerSession
3. Remove a flag in SuggestionsInfo

Change-Id: I3debe09e213fc0ab74618eb3504383f2a9447fd9
extservice/SpellCheckerSession.java
988323c57bd25a58f05dfa492d9b9c8ab62c5153 22-Jun-2011 satok <satok@google.com> Create TextServiceManager and SpellCheckerService

Bug: 4176026

This CL inherits https://android-git.corp.google.com/g/112600

Spec of TextServiceManager
- Chooses the most applicable TextService(e.g. SpellCheckerService, WordBreakIteratorService..)
for each locale

Spec of SpellCheckerService
- Returns whether the given string is a correct word or not
- Returns Suggestions for the given string

Change-Id: Iaa425c7915fe70767ad0b17bf6c6fbcd2a1200b2
extservice/SpellCheckerService.java
extservice/SpellCheckerSession.java
6dd005b48138708762bfade0081d031a2a4a3822 18-Jul-2011 Dianne Hackborn <hackbod@google.com> I. Can. Not. Stand. ViewAncestor.

It was done so we would have the name "ViewRoot" available for a
public API. However, the name "ViewAncestor" just makes no sense.
So instead, change it to ViewRootImpl.

Change-Id: If9599ca67896f339f6fefa7d1dde121201171d97
allpaper/WallpaperService.java
24572375323dee79e3b456af07640ca194fd40bf 10-Jun-2011 Jeff Brown <jeffbrown@google.com> Optimize orientation changes.

Modified setRotation to allow it to restart a rotation in
progress as long as the rotation animation has not yet started.
This enables the system to recover more quickly from mispredicted
orientation changes.

Removed the call to System.gc() when freezing the display, which
added 60-80ms before we even started the orientation change.
We used to need this to make it less likely that an upcoming GC
would cause a pause during the window animation, but this is
not longer a concern with the concurrent GC in place.

Changed the wallpaper surface to be 32bit. This accelerates
drawing and improves the overall appearance slightly.

Reduced code duplication in the WallpaperManager.

Change-Id: Ic6e5e8bdce4b970b11badddd0355baaed40df88a
allpaper/WallpaperService.java
c6cc0f8c19d9eccf408a443fa2bf668af261dcd0 12-Apr-2011 Joe Onorato <joeo@google.com> Rename ViewRoot to ViewAncestor.

ViewRoot is about to be a new public class for poking at ViewAncestor.

Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
allpaper/WallpaperService.java
33bbfd2232ea9eaae9a9d87a05a95a430f09bd83 25-Feb-2011 Jeff Brown <jeffbrown@google.com> Add support for mouse hover and scroll wheel.

Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View
hierarchy as onGenericTouchEvent. Pointer events dispatched
this way are delivered to the view under the pointer. Non-pointer
events continue to be delivered to the focused view.

Added scroll wheel support to AbsListView, ScrollView,
HorizontalScrollView and WebView. Shift+VSCROLL is translated
to HSCROLL as appropriate.

Added logging of new pointer events in PointerLocationView.

Fixed a problem in EventHub when a USB device is removed that
resulted in a long stream of ENODEV errors being logged until INotify
noticed the device was gone.

Note that the new events are not supported by wallpapers at this time
because the wallpaper engine only delivers touch events.

Make all mouse buttons behave identically. (Effectively we only
support one button.)

Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
allpaper/WallpaperService.java
3b723ace405305e61ab25f96cb8ee1a321edcf9b 02-Feb-2011 Michael Jurka <mikejurka@google.com> am 46ab5e13: Merge "add missing call to superclass method" into honeycomb

* commit '46ab5e13f27324d634ff27b7fd75c5d432b915bf':
add missing call to superclass method
b8f939fb5759fc25fced8df3304d6288b0c25430 02-Feb-2011 Michael Jurka <mikejurka@google.com> add missing call to superclass method
allpaper/WallpaperService.java
d48ba867d69159542cf967d5fcaba41c5474f134 02-Feb-2011 Dianne Hackborn <hackbod@google.com> am e77f9914: Merge "Whoops, need to put this check back." into honeycomb

* commit 'e77f99144f015d9044909a4c128fa916465b0671':
Whoops, need to put this check back.
a48a37f025dd875bfb1e46b673a3a54fb8e6b26b 02-Feb-2011 Dianne Hackborn <hackbod@google.com> Whoops, need to put this check back.

We still don't want third party wallpapers to be able to do this,
since it can't work with all window animations.

Change-Id: I97c8ef78c36bd89bf47a7c4533ed1c244dcff4a6
allpaper/WallpaperService.java
2a70a1e349cb982ae68196195d4745474d8f2568 02-Feb-2011 Dianne Hackborn <hackbod@google.com> am bd77ed7f: Merge "Make image wallpaper use a big surface." into honeycomb

* commit 'bd77ed7fff87b79008e3b071115674dff2721994':
Make image wallpaper use a big surface.
f185552f63fe4a4a1a8de602bc6fc6e57d3ff7fe 02-Feb-2011 Dianne Hackborn <hackbod@google.com> Make image wallpaper use a big surface.

Change-Id: I119f2bfee5fde08040520bd0da8574194a893ab5
allpaper/WallpaperService.java
391ef42c92ab97e5c22a720973790696d30576ca 25-Jan-2011 Jeff Brown <jeffbrown@google.com> am 3168a137: Merge "Fix surface frame size reporting." into honeycomb

* commit '3168a13723ff0f3f87937457fe33c3518caa4bb9':
Fix surface frame size reporting.
30bc34f191ca8a009af313fc751e5b4bff6e39a1 25-Jan-2011 Jeff Brown <jeffbrown@google.com> Fix surface frame size reporting.

The SurfaceHolder provided by the wallpaper service was not reporting
the correct size in getSurfaceFrame(). This broke an optimization in
the ImageWallpaper. The old code happened to work because calling
lockCanvas on the SurfaceHolder with a null dirty rectangle happened
to have the side-effect of updating the SurfaceHolder's surface frame
size field because it passed mSurfaceFrame as the dirty rect, causing
mSurfaceFrame to be set to the size of the region to be drawn.

However, relying on this side-effect is wrong. Among other things,
the dirty region could actually be smaller than the surface frame.

This patch fixes WallpaperService, SurfaceView and ViewRoot to ensure
that the surface frame size is always set explicitly and is not modified
by calls to lockCanvas.

Change-Id: I10948f5ec269409ceaf0f7d32b3f6731e9499ebc
allpaper/WallpaperService.java
b841fa63026803093c093ad25ab0ccbd4c49e45b 13-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 54f428a6: am bdb7aee0: Merge "Fix for crash when setting live wallpaper."

* commit '54f428a63f33f4722c09b7688e6ca7960394f81f':
Fix for crash when setting live wallpaper.
d9463f50c8c1aa8969502b117777a4c185971c08 12-Jan-2011 Mattias Petersson <mattias.petersson@sonyericsson.com> Fix for crash when setting live wallpaper.

This fix prevents a crash that sometimes happens when setting a
live wallpaper. It happened when pressing "Set wallpaper" button
in the live wallpaper preview activity, before the preview was
fully loaded.

The crash happened in native code while updating the wallpaper
surface when calling mInputChannel.registerInputChannel(),
because the previous call to
mSession.add(mWindow, mLayout, View.VISIBLE, mContentInsets,
mInputChannel)
had failed. The fix aborts the surface update when it is not
possible to add the window.

Change-Id: I0e79a851e5c7f7b15eb07043c63d1f4d78f14616
allpaper/WallpaperService.java
9f3bdfe3eb04723efa07a2d0e6a7709da1191fa5 13-Oct-2010 Jeff Brown <jeffbrown@google.com> Add method for sending wallpaper commands directly to an engine.

This enables the livewallpaper preview activity to send tap commands to the
wallpaper so that the preview is more interactive.

Also add a command for sending secondary pointer taps for multitouch
enabled wallpapers.

Change-Id: I9fa10cc47d92dfa9f1a1208aba44c66943eee3ec
allpaper/IWallpaperEngine.aidl
allpaper/WallpaperService.java
3915bb845b032dc184dba5e60970b803390ca3ed 05-Nov-2010 Jeff Brown <jeffbrown@google.com> Tell system server whether the app handled input events.

Refactored ViewRoot, NativeActivity and related classes to tell the
dispatcher whether an input event was actually handled by the application.

This will be used to move more of the global default key processing
into the system server instead of the application.

Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
allpaper/WallpaperService.java
f04c8816f95bea10071ea24e5797181df472d52d 29-Oct-2010 Joe Onorato <joeo@android.com> am dbf9a02b: am ed3c7be8: Merge "Report the new size to wallpapers when the requested size changed." into gingerbread

* commit 'dbf9a02b0abe7cac3c15f7cc36b95d5998927ad8':
Report the new size to wallpapers when the requested size changed.
dcfae5c0fdc917f15a3e9ab75ee1d819b6db26ba 29-Oct-2010 Joe Onorato <joeo@android.com> Report the new size to wallpapers when the requested size changed.

We were telling the app, but we weren't saving the data for ourselves.
This also tells them to re-scroll when there's a new size.

Bug: 3144373
Change-Id: I9d12b714119ff02dd7d7f1cfa997d8a44475b9e9
allpaper/WallpaperService.java
4924aee9cb1c5988359f3162b6e89689c5b101e1 22-Oct-2010 Jeff Brown <jeffbrown@google.com> am 482284ad: am 6b3178a6: Merge "Fix a race condition in wallpaper move throttling." into gingerbread

Merge commit '482284ad0e3226b49c27bf41442c1cb150853226'

* commit '482284ad0e3226b49c27bf41442c1cb150853226':
Fix a race condition in wallpaper move throttling.
840db1f678ed15f0f3e9c58310b1e80ebb1f331a 22-Oct-2010 Jeff Brown <jeffbrown@google.com> Fix a race condition in wallpaper move throttling.

Bug: 3099316
Change-Id: Ia3221975b5be7fae8359d6ab531bbecd0e29aee9
allpaper/WallpaperService.java
25108167fdc2f2e1d7f75f7eacfe7cb904ab92a9 12-Oct-2010 Bjorn Bringert <bringert@android.com> Remove the unused UrlRendererService

Change-Id: I48af718d9753b475bd041147f0d18bee60da84ec
rlrenderer/IUrlRendererCallback.aidl
rlrenderer/IUrlRendererService.aidl
rlrenderer/UrlRenderer.java
rlrenderer/UrlRendererService.java
62bf4a0283e855e2fb5f40f36909501e5b4a09eb 09-Sep-2010 Mathias Agopian <mathias@google.com> Force wallpaper surface to 565.

This is to maintain backward compatibility with badly programmed
GL wallpapers. Wallpapers can call SurfaceHolder.setFormat() to
request a different format.

Change-Id: Ib42b0cf6c7040d1300cad239c3acfd5c4c6cd326
allpaper/WallpaperService.java
c5ed5910c9ef066cec6a13bbb404ec57b1e92637 15-Jul-2010 Jeff Brown <jeffbrown@google.com> Add support for new input sources.

Added several new coordinate values to MotionEvents to capture
touch major/minor area, tool major/minor area and orientation.

Renamed NDK input constants per convention.

Added InputDevice class in Java which will eventually provide
useful information about available input devices.

Added APIs for manufacturing new MotionEvent objects with multiple
pointers and all necessary coordinate data.

Fixed a bug in the input dispatcher where it could get stuck with
a pointer down forever.

Fixed a bug in the WindowManager where the input window list could
end up containing stale removed windows.

Fixed a bug in the WindowManager where the input channel was being
removed only after the final animation transition had taken place
which caused spurious WINDOW DIED log messages to be printed.

Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
allpaper/WallpaperService.java
1d28f9c0aabee7f9e1c38451a4baf13109244c18 14-Jul-2010 Dianne Hackborn <hackbod@google.com> Fix docs build.

Change-Id: Ibb8e1e4b18ec1e92e28d354cdcce37676056b348
allpaper/WallpaperService.java
d76b67c340d1564abf8d14d976fdaf83bf2b3320 14-Jul-2010 Dianne Hackborn <hackbod@google.com> IME events are now dispatched to native applications.

And also:

- APIs to show and hide the IME, and control its interaction with the app.
- APIs to tell the app when its window resizes and needs to be redrawn.
- API to tell the app the content rectangle of its window (to layout
around the IME or status bar).

There is still a problem with IME interaction -- we need a way for the
app to deliver events to the IME before it handles them, so that for
example the back key will close the IME instead of finishing the app.

Change-Id: I37b75fc2ec533750ef36ca3aedd2f0cc0b5813cd
allpaper/WallpaperService.java
00fa7bdd69f0868fd17ea7c881c771d785b2fbbd 03-Jul-2010 Jeff Brown <jeffbrown@google.com> More native input dispatch work.

Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.

Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
allpaper/WallpaperService.java
349703effce5acc53ed96f7ed8556131f0c65e18 22-Jun-2010 Jeff Brown <jeffbrown@google.com> Native input event dispatching.

Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.

Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
allpaper/WallpaperService.java
46b9ac0ae2162309774a7478cd9d4e578747bfc2 23-Apr-2010 Jeff Brown <jeffbrown@google.com> Native input dispatch rewrite work in progress.

The old dispatch mechanism has been left in place and continues to
be used by default for now. To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API. Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument. The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points. The ViewRoot then
provides the InputChannel to the InputQueue. Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue. This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event. Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets). Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
allpaper/WallpaperService.java
dc8a7f69d7df5f1ca29763995a0d55acf7936fc6 10-May-2010 Dianne Hackborn <hackbod@google.com> Add new API to take over a window's Surface.

Change-Id: Iad6245faadc95f19ea63c8e229a1c02e9188f69e
allpaper/WallpaperService.java
18ee31e89766ec78f1c25f4e307306a16fe35818 28-Apr-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2594388: WallpaperService doesn't always call onSurfaceDestroyed()

Take care of the window manager destroying a surface, to report to the
app that it has been destroyed. Make sure to perform a traversal when
becoming visible to re-create the surface if needed.

Change-Id: If3bc05e0106f90d4c3bad2d7575212667680fbc8
allpaper/WallpaperService.java
ba3e31d9eed67291a51b501d12fdc27625af688e 23-Apr-2010 Dianne Hackborn <hackbod@google.com> Some debugging help for issue #2594388

WallpaperService doesn't always call onSurfaceDestroyed()

Just helps us see a little better what is going on.

Change-Id: Ibe8efd9e343e880ca31df446c8b36c7fa3722e87
allpaper/WallpaperService.java
694f79b5d1196640d1beb680b7d1fc68e6e77cbd 18-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2519590: Lock screen stuck in landscape mode

Well, mostly. There is still a problem here where the first time
you show the lock screen it just doesn't draw itself. I assume
this is something breaking in the view hierarchy as it floounders
around removing and adding new views as it is first being shown...
but no idea at this point what is the actual case.

Change-Id: Iba99ae3242931c8673b17b106c86fc99e2c52abe
allpaper/WallpaperService.java
04cde3413cbdb004642267f3d2139e90f9c1072e 05-Mar-2010 Romain Guy <romainguy@android.com> Report an offset change in a live wallpaper when the wallpaper is resized.
Bug #2489288

Prior to this change, changing the display's orientation would not send an offset
change, which could cause live wallpapers relying on pixel offsets to display the
wrong position.
allpaper/WallpaperService.java
e36d6e277e49475076b7872d36ea6a5c5b996e9d 18-Feb-2010 Dianne Hackborn <hackbod@google.com> Work on issue #2263557: PMF3000 showing hybrid of portrait and landscape modes

This is a bunch of reworking of how configuration changes are handled:

- When orientation is changing (for whatever reason), the window manager no
longer tries to pre-emptively compute a new configuration. Instead, it
just determines change is happening and tells the window manager.
- The activity manager is now responsible for giving the window manager the
final configuration it is using. This is both so it knows whem the
activity manager is done with its configuration updates, and so the window
manager can use the "real" configuration.
- When an orientation or other configuration change is happening, freeze the
screen and keep it frozen until the activity manager has given us the
final configuration.
- The window manager can now send new configurations to its clients during
its layout pass, as part of a resize, if it has determined that it has
changed. This allows for a new View.onConfigurationChanged() API for any
view to easily find out when the configuration has changed.
- ViewRoot now also works with the activity thread to make sure the process's
current resources are updated to the new configuration when it receives one
from a window. This ensures that at the time onConfigurationChanged() and
other view callbacks are happening, the correct configuration is in force.
- There is now a sequence number associated with Configuration, which
ActivityThread uses to avoid using stale configurations. This is needed now
that it can receive configurations asynchronously from both the window
manager and activity manager.
- The hack for keeping the locale has been removed, and underlying problem
fixed by having Configuration initialize its locale to "unknown" instead of
a valid default value.
allpaper/WallpaperService.java
45948fd407da525e6c8721ba75cfc8b356fc7e0f 14-Jan-2010 Patrick Scott <phanna@android.com> First pass at the url rendering service.

The service renders a list of urls at the given dimension and invokes the
callback interface for each result. A ParcelFileDescriptor is used to transfer
the large image data to the client. The client must close the file descriptor
is order free the underlying resources.

A more robust api will use UrlRendererRequest and UrlRendererResponse objects
to transfer data.
rlrenderer/IUrlRendererCallback.aidl
rlrenderer/IUrlRendererService.aidl
rlrenderer/UrlRenderer.java
rlrenderer/UrlRendererService.java
d68478467e3f837511196c80891d7245d0e163df 13-Jan-2010 Dianne Hackborn <hackbod@google.com> First pass at new device policy and administration APIs.

This adds new DevicAdmin, DevicePolicyManager, and DeviceAdminInfo classes.
See the java docs for each on documentation on them. Basically: a DeviceAdmin
is what you derive from to administer a device; DevicePolicyManager is what you
use to apply and check your policy requirements and perform other administration
tasks.
allpaper/WallpaperService.java
980a938c1c9a6a5791a8240e5a1e6638ab28dc77 09-Jan-2010 Romain Guy <romainguy@android.com> Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
allpaper/WallpaperService.java
af1f42be96a6ffa7a9b63e199e1614281ea3282d 21-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2271668: Live Wallpaper Force-Close when changing from live wallpaper to picasa wallpaper

The detach of the wallpaper engine was coming in after the containing
service was destroyed. This was possible because these are different
IPC interfaces so will not be serialized. The fix is to keep track
of all of the active engines in the serice, and detach any remaining
ones when the service is destroyed.

Change-Id: I8810786a777dd4f7b15cfbd2e0da25866a4f3ec5
allpaper/WallpaperService.java
e4260f4e7da4da32bfab2737018cf9cf75215894 19-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I3aeb4f374a99d5872ba19c04624aa1b5ca6cd5d0
allpaper/WallpaperService.java
23ef7b4836d66d31430fedee2aac36275bb30d4b 19-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix most of issue #2271640: Fix wallpaper etc docs

Only thing remaining is the live wallpaper feature.

Change-Id: I8854c7978999d759bf618307f4f984c9c89d3fc8
allpaper/WallpaperService.java
allpaper/WallpaperSettingsActivity.java
6adba2467ca524b4c4f3d775de6aa10a9ad57aea 10-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2170897: wallpaper touch-up event not seen when exiting lock screen

Make sure to deliver events to the wallpaper until the final up.

Also fix behavior in the case where a window goes away while the pointer is still
down in it, which is a fairly novel situation introduced by the new lock screen.

Also add infrastructure for delivering motion events during preview.

Change-Id: I0de7979be27e00caf0b1eff794ea899a815142f6
allpaper/IWallpaperEngine.aidl
allpaper/WallpaperService.java
bf6956b1d95442e9d9c483894d578fe6b7044cbb 10-Nov-2009 Marco Nelissen <marcone@google.com> Add a way for wallpapers to know the delta between virtual screens.
allpaper/WallpaperService.java
47ef42667935dfd49d0bf5f893539a140532a184 07-Nov-2009 Charles Mendis <cmendis@google.com> Expose WallpaperSettingsActivity in the public API.
allpaper/WallpaperSettingsActivity.java
13bf8260134d516cbcc982d360d9f21067f47fa6 06-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix SDK build: a few things missing, a link that was wrong.

Change-Id: I55c9c510b3f0866ce6085927afa00b9fb69dd8c5
allpaper/WallpaperService.java
274b120f3975c8db6daeeab51a5fe08d6dede479 06-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2243096: Need to expose live wallpaper APIs in SDK

Change-Id: I7e996bf549922c1bb8e8c00d051650ffe12d818c
allpaper/WallpaperService.java
7580493b014a2c7ea883cd291255798dc72ebbff 21-Oct-2009 Dianne Hackborn <hackbod@google.com> Implement feature #2117336: Create event communication APIs for live wallpaper

Note: currently only implements an async version (no result), and not yet
actually tested.

Change-Id: Id47ed045a4b0eb309ea8c58daf41a0e03eff1d3a
allpaper/WallpaperService.java
29e4a3c566f435c32f0b95e4ac8e8b33cac6faba 01-Oct-2009 Dianne Hackborn <hackbod@google.com> Update from API review.

Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
allpaper/WallpaperSettingsActivity.java
ae87bd089aaa2f30b4e0d68fff25ea725a14aa9e 17-Sep-2009 Marco Nelissen <marcone@google.com> Fix typo
allpaper/WallpaperService.java
9767e41d92bd6f4cf16111b3f911cef78c8b01eb 16-Sep-2009 Dianne Hackborn <hackbod@google.com> Some improvements for wallpaper configuration.

This introduces a new activity that you can derive from to implement
a wall paper configuration activity. This is supposed to select
a theme based on whether it is being run to configure a real wallpaper
or a preview, but this is going to be more difficult to do than I
thought. :(

Also fix a problem in the white theme where the list view's background
was being set to white, so it wouldn't work on a transparent bg.

Change-Id: I26d5a8695a3c878a1664eb09900eded57eaff990
allpaper/WallpaperSettingsActivity.java
19382ac1a4e4e7c23a1346d299368763f149de9c 12-Sep-2009 Dianne Hackborn <hackbod@google.com> Some optizations to wallpaper drawing/scrolling.

First, fix some issues with the final wallpaper bitmap
we use: ensure it is always 16bpp, and make sure dithering
of its bitmap is turned off. We take of dithering
when loading, to make sure we don't use it when drawing.

Also add new APIs to return the wallpaper with the equivalent
of Launcher's old FastBitmapDrawable. As doing this, also load
the default wallpaper the same way as custom ones, taking care to
resize it as needed at load time.

Finally implement a mechanism for the window manager to wait
for the wallpaper to redraw at its new position before returning
from the application's call to change the offset. This ensures
that the wallpaper better tracks the application. Note that there
is a timeout in this wait that is relatively short, and if it
expires we will run for a while without waiting.

Change-Id: Ife449437746da85958bd447e0a6cf3d2223b398c
allpaper/WallpaperService.java
bcbcaa7edd32ba67c6290d79f7e7821c4b5b39ac 10-Sep-2009 Dianne Hackborn <hackbod@google.com> Wallpapers, animations, pending intent.

Some more tweaks and fixes to wallpapers. Make sure wallpapers are
told they are not visible when the screen is off. Add some new animations
for transitions across tasks, and fiddle with many of the existing
animations. Clean up the relationship between translucent activities
and animations. Add new API to start a PendingIntent from an
activity.

Change-Id: Ie0bf45fe44081bb6982c75361257a55d9cd9d863
allpaper/WallpaperService.java
eb034652c2037a47ebfd99779e8383bb8bb528af 07-Sep-2009 Dianne Hackborn <hackbod@google.com> Implement all of the infrastructure for configuring wallpapers.

Actually being able to configure a wallpaper relies on additional
work in the launcher and wallpapers that will be in another change.
Also note that this breaks all existing wallpapers, since they now
need to include a meta-data item about themselves. This also
will be fixed in another change.

Change-Id: I97d2c2bd07237abc32f92b9147c32530a2f73c71
allpaper/WallpaperService.java
0586a1b77a788a119166a37fccd909bf9ed65f23 07-Sep-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2095422: Some fades from opaque to transparent don't work

ViewRoot was using Surface.clear(), which has different behavior
in different processes -- in the system process it would kill the
surface, causing all windows in that process to immediately disappear
instead of animating away.

This change makes Surface.release() public and uses that instead. It
also renames Surface.clear() to Surface.destroy().

Also fixed some issues in the window manager that were causing the
wallpaper to not get immediately resized when the orientation changes
and its target window is removed and re-added.

Change-Id: I2a992e365cf5747511f0bf1193db32dc2525b218
allpaper/WallpaperService.java
284ac93aa30642fda87d5c40263a1263677c21cd 28-Aug-2009 Dianne Hackborn <hackbod@google.com> More work on wallpapers: animations, lifecycle, scaling, etc.

Yet more work on improving the behavior of wallpapers. This fixes a few
problems in their lifecycle (corresponding change in the picker also
required for this), makes their animations better for hardware that supports
alpha fades, adds animations for the wallpapers themselves, eliminates
fixed size wallpapers, and adjusts the API for retrieving a wallpaper
bitmap to take care of scaling the raw wallpaper image to match the current
desired width and height.

Change-Id: If1c0aaceba4ea4e175dcb7a8416ca7ddbb9bfa6f
allpaper/IWallpaperEngine.aidl
allpaper/WallpaperService.java
3be63c09309b21c01b535271625d4c39045690e5 21-Aug-2009 Dianne Hackborn <hackbod@google.com> Infrastructure for supporting wallpaper previews.

Various things that will allow us to show previews of wallpapers.
Also some fixes to animations across wallpapers.
allpaper/IWallpaperService.aidl
allpaper/WallpaperService.java
cbf15048240ecf460957ac3de98a7efbccbbb754 19-Aug-2009 Dianne Hackborn <hackbod@google.com> Don't call onSurfaceChanged() if nothing interesting has changed.
allpaper/WallpaperService.java
8df8b2b405c60cacf7a66c4e2ca078dd3d7ec7bd 18-Aug-2009 Dianne Hackborn <hackbod@google.com> Allow wallpapers to get touch events.
allpaper/WallpaperService.java
7341d7a104b47996445d069a695e155a07184606 14-Aug-2009 Dianne Hackborn <hackbod@google.com> More work on wallpapers.

- Do better about figuring out when to stop them and other related window
management.
- Fix problem where we were not redrawing the surface when the orientation
changed. This was the cause of the device hang.
allpaper/WallpaperService.java
72c82ab9923025a91bbabb32e56bfea27bfd083b 12-Aug-2009 Dianne Hackborn <hackbod@google.com> Report wallpaper offset to the wallpaper, use this in the image wallpaper.

Wallpapers can now be just the size of the screen, and get told when their
scroll position should change to do the updating on their own.
allpaper/WallpaperService.java
759a39e8d2a8b27ef07e102394629dce68aa186b 10-Aug-2009 Dianne Hackborn <hackbod@google.com> Live wallpapers become a little more real.

This adds a new theme for having a wallpaper, and fixes up the window manager
to do the right thing when transitioning between a windows with and without
wallpapers (between two windows with wallpapers is not yet addressed).

The wallpaper API now has callbacks to tell you when to start/stop animating.

Also fiddle the image wallpaper to be a little more interesting.
allpaper/WallpaperService.java
4c62fc0e1e5ea9c69a12a7d1cf8b3ec8b2d114a3 09-Aug-2009 Dianne Hackborn <hackbod@google.com> Very primitive wallpapers in a surface.

This is all of the basic pieces:

- The WallpaperService now creates a surface with the window manager for its
contents.
- There is a simple service that displays a bitmap.
- The wallpaper manager takes care of starting and stopping the service.
- The window manager knows about wallpaper windows and how to layer them with
the windows that want to be shown on top of wallpaper.

Lots and lots of issues remain, but at this point you can actually write a
wallpaper service, select it in the UI, and see it behind an activity.
allpaper/IWallpaperConnection.aidl
allpaper/IWallpaperEngine.aidl
allpaper/IWallpaperService.aidl
allpaper/WallpaperService.java
8cc6a5026aeb5cf9cc36529426fe0cc66714f5fb 06-Aug-2009 Dianne Hackborn <hackbod@google.com> First bit of wallpaper work.

This is mostly refactoring, adding a new WallpaperManager class that takes care
of the old wallpaper APIs on Context, so we don't need to pollute Context with
various new wallpaper APIs as they are needed. Also adds the first little
definition of a wallpaper service, which is not yet used or useful.
allpaper/IWallpaperService.aidl
allpaper/WallpaperService.java