History log of /frameworks/base/services/java/com/android/server/WallpaperManagerService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d6e836c4a0ebf3af571c46986d324c1bd599ba95 18-Nov-2013 John Spurlock <jspurlock@google.com> Use scaled display size in wallpaper constraint.

Bug:11596190
Change-Id: Icc81beeea2e71144c2e5330b047e4781a23d7449
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
41f6464b3f247c6ee0828e1b1aa3300e56e8cabb 04-Nov-2013 John Spurlock <jspurlock@google.com> Ensure wallpaper hint is at least as large as the display.

Bug:11332853
Bug:11606952
Change-Id: I1840d7b723015c379da8eab7e22aa478d56adeb3
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
7ea91ec181b88f71390c544029d0c864f49ca92d 04-Nov-2013 John Spurlock <jspurlock@google.com> Ensure wallpaper hint is at least the display's max size.

Bug:11332853
Change-Id: Ied13ffab77395f64642f7fb536f36d9cd8367e74
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
5203a8b50b28764971fbeac637b2bfaaaec56322 03-Oct-2013 Michael Wright <michaelwr@google.com> Ensure WallpaperEngine has correct size information

Currently it's possible for the WallpaperManagerService to receive a
request to change the desired wallpaper size between when it attaches
to the WallpaperService and when the Engine attaches back to it. This
means that the Engine will be created with the prior dimensions and
won't receive the update. Check to see if we're in this state and
make note to update the Engine once it attaches to ensure that the
Engine always has the correct dimensions.

Bug: 10853302
Change-Id: I8d5cd3371b269dbb4c0ff2d75c68529b69028ae5
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
909522048f7ce7af54e1476175c8e8d1df808a04 08-Sep-2013 Christopher Tate <ctate@google.com> Don't crash attempting restore of uninstalled live wallpaper

Bug 10658041

Change-Id: I08b38cc81fbb89907a4ffe5b6f94e9a507226011
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
c59df3caeb9a7825d7fe34075ed0ea07b924e5c7 16-Jul-2013 Svetoslav Ganov <svetoslavganov@google.com> Merge "Refactoring of the print sub-system and API clean up."
a00271533f639c8ed36429c663889ac9f654bc72 25-Jun-2013 Svetoslav Ganov <svetoslavganov@google.com> Refactoring of the print sub-system and API clean up.

1. Now a user state has ins own spooler since the spooler app is
running per user. The user state registers an observer for the state
of the spooler to get information needed to orchestrate unbinding
from print serivces that have no work and eventually unbinding from
the spooler when all no service has any work.

2. Abstracted a remote print service from the perspective of the system
in a class that is transparently managing binding and unbinding to
the remote instance.

3. Abstracted the remote print spooler to transparently manage binding
and unbinding to the remote instance when there is work and when
there is no work, respectively.

4. Cleaned up the print document adapter (ex-PrintAdapter) APIs to
enable implementing the all callbacks on a thread of choice. If
the document is really small, using the main thread makes sense.

Now if an app that does not need the UI state to layout the printed
content, it can schedule all the work for allocating resources, laying
out, writing, and releasing resources on a dedicated thread.

5. Added info class for the printed document that is now propagated
the the print services. A print service gets an instance of a
new document class that encapsulates the document info and a method
to access the document's data.

6. Added APIs for describing the type of a document to the new document
info class. This allows a print service to do smarts based on the
doc type. For now we have only photo and document types.

7. Renamed the systemReady method for system services that implement
it with different semantics to systemRunning. Such methods assume
the the service can run third-party code which is not the same as
systemReady.

8. Cleaned up the print job configuration activity.

9. Sigh... code clean up here and there. Factoring out classes to
improve readability.

Change-Id: I637ba28412793166cbf519273fdf022241159a92
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
c8230519728b14065effd3b7d4eca273ff86160c 14-Jul-2013 Dianne Hackborn <hackbod@google.com> Switch proc stats to use new process state constants.

These new constants are a better mapping to the kind of
information that procstats is wanting to collect about
processes. In doing this, the process states are tweaked
to have a bit more information that we care about for
procstats.

This changes the format of the data printed by procstats,
so the checkin version is bumped to 2. The structure is
the same, however the codes for process states have all
changed. The new codes are, in order of precedence:

p -- persistent system process.
t -- top activity; actually any visible activity.
f -- important foreground process (ime, wallpaper, etc).
b -- important background process
u -- performing backup operation.
w -- heavy-weight process (currently not used).
s -- background process running a service.
r -- process running a receiver.
h -- process hosting home/launcher app when not on top.
l -- process hosting the last app the user was in.
a -- cached process hosting a previous activity.
c -- cached process hosting a client activity.
e -- cached process that is empty.

In addition, we are now collecting uss along with pss
data for each process, so the pss checkin entries now
have three new values at the end of the min/avg/max uss
values of that process.

With this switch to using process state constants more
fundamentally, I realized that they could actually be
used by the core oom adj code to make it a lot cleaner.
So that change has been made, that code has changed quite
radically, and lost a lot of its secondary states and flags
that it used to use in its computation, now relying on
primarily the oom_adj and proc state values for the process.

This also cleaned up a few problems -- for example for
purposes of determing the memory level of the device, if a
long-running service dropped into the cached oom_adj level,
it would start being counted as a cached process and thus
make us think that the memory state is better than it is.
Now we do this based on the proc state, which always stays
as a service regardless of what is happening like this, giving
as a more consistent view of the memory state of the device.

Making proc state a more fundamentally part of the oom adj
computation means that the values can also be more carefully
tuned in semantic meaning so the value assigned to a process
doesn't tend to change unless the semantics of the process
has really significantly changed.

For example, a process will be assigned the service state
regardless of whether that services is executing operations
in the foreground, running normally, or has been dropped to
the lru list for pruning. The top state is used for everything
related to activities visible to the user: when actually on
top, visible but not on top, currently pausing, etc.

There is a new Context.BIND_SHOWING_UI added for when system
services bind to apps, to explicitly indicate that the app
is showing UI for the system. This gives us a better metric
to determine when it is showing UI, and thus when it needs
to do a memory trim when it is no longer in that state. Without
this, services could get in bad states of continually trimming.

Finally, more HashSet containers have been changed to ArraySet,
reducing the temporary iterators created for iterating over
them.

Change-Id: I1724113f42abe7862e8aecb6faae5a7620245e89
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
27b89e6658a0d233a53f5d7ca20dc57fec82d955 16-Jan-2013 Amith Yamasani <yamasani@google.com> Rename bindService to bindServiceAsUser to follow convention.

This is for the multi-user version of bindService, not the original.

Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
13579ed3305bf89b41a9fa88e1347f0e0769d279 29-Nov-2012 Dianne Hackborn <hackbod@google.com> Cleaner initial boot.

This does some cleanup of the initial boot, especially when
booting in "no core apps" mode for encryption/decryption.

Change-Id: Ifb3949f580e52f54559e603c4b0b104f6bac2f6c
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
0c293717126b52e71eaf794394f336b5940fb349 30-Oct-2012 Amith Yamasani <yamasani@google.com> Don't clean up wallpaper map entry when stopping a user.

Sometimes on quickly stopping and starting a user, a race condition
causes the user entry to disappear, causing crashes in Launcher and
SystemUI. Removing this step, since it doesn't really leave much
residue behind.

Bug: 7434849
Change-Id: Ia188602f1a79f75d307397459c2a03fadee4c722
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
756901d82b41f50610a63b7cf4c7747a70f1f724 12-Oct-2012 Amith Yamasani <yamasani@google.com> Do cleanup when Stopping users

Mark user 0 as initialized, otherwise it will show up as
uninitialized when viewed from secondary user if never switched to user 0.

Bug: 7301595

Also clean up any users that were in the process of being removed, if device
crashes at a bad time.

Change-Id: Ic16a6c9ccb6a64b7463725f6cc279335a821fcd5
/frameworks/base/services/java/com/android/server/WallpaperManagerService.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
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
6474c4cd939fcb03449e607c7cd06b95c4632aaa 04-Oct-2012 Amith Yamasani <yamasani@google.com> Fix dupes in initial wallpaper selection

Bug: 7281217

Needed to load the settings for the user, in case the user was stopped.

Change-Id: I52d1f59a7681f8c4f7d3596486accb91cb840ecf
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
c72fc674a33b8d17585764d09d3bb6c77d7d947e 20-Sep-2012 Dianne Hackborn <hackbod@google.com> Implement multi-user PackageMonitor.

New APIs let you indicate what user(s) to monitor, and tell you
what user is changing when receiving a callback.

Fix package manager to only deliver package brpadcasts to the
running users. (This isn't really a change in behavior, since
the activity manager would not deliver to stopped users anyway).
Make sure all broadcasts that package monitor receives also include
user information for it to use.

Update wallpaper service to (hopefully) now Really Correctly
monitor package changes per user.

Change-Id: Idd952dd274abcaeab452277d9160d1ae62919aa0
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
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
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
2701f325a6d4acd920637d2ff6fd6972a9cf836b 01-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Remove Binder.getOrigCallingUid()." into jb-mr1-dev
61f57379ca2c5b6290c8da7548fa17128f7ab24f 31-Aug-2012 Amith Yamasani <yamasani@google.com> Centralize the creation of the user system directory

Environment.getUserSystemDirectory(int userId)

Use it all relevant places that was hardcoding it.
Also, wipe out the user's system directory when user is removed, otherwise old state
might be transferred to a new user.

Change-Id: I788ce9c4cf9624229e65efa7047bc0c019ccef0a
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
4120375d46091df8527bb701882e056fbb0e6b06 31-Aug-2012 Dianne Hackborn <hackbod@google.com> Remove Binder.getOrigCallingUid().

Replaced all remaining places that used it with explicit user
specification.

While doing this, I ran into stuff that was creating PendingIntent
objects (that now need to specify the explicit user they are for),
which are also posting notifications... but have no way to specify
the user for the notification.

So the notification manager in the system process now also gets a
formal concept of a user associated with the notification, which
is passed in to all the necessary aidl calls. I also removed the
old deprecated aidl interface for posting/cancelling notifications,
since we now always need a user supplied.

There is more work that needs to be done here, though. For example
I think we need to be able to specify USER_ALL for a notification that
should be shown to all users (such as low storage or low battery).
Along with that, the PendingIntent creation needs to be tweaked to
be able to handle USER_CURRENT by evaluating the user at the point the
pending intent is sent.

That's for another change, however.

Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
5ac72a29593ab9a20337a2225df52bdf4754be02 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Improve multi-user broadcasts.

You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
4e2820c22b3f8b330f8c6d04562037c77845716d 29-Aug-2012 Amith Yamasani <yamasani@google.com> Fix adding live wallpaper in a second user

When the second user downloads a new wallpaper service, Wallpaper
service needs to query the correct user's package state to figure
out if it is available and bind to it.

Change-Id: Ifb95db1c859887f996f5b2e821b4b46510ee7016
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
ce777171fce4911f383e838d9019d84520426456 19-Aug-2012 Amith Yamasani <yamasani@google.com> Fixed static wallpaper for multi-user

Earlier assumption that systemui was running in the system process
does not hold true, so running static wallpaper in its own user
sandbox.

Bug: 7008230
Change-Id: I32a128e6bbd8efa7006286330e970bafcf37f05a
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
2a00329c6d55c6cd9166e01963d7410e95d80d21 15-Aug-2012 Amith Yamasani <yamasani@google.com> UserHandle to UserSerialNo mapping

Use AtomicFile for usermanager files.

Added a MANAGE_USERS permission that apps (signature permission) can use
to create/query/modify/remove users.

Change-Id: I5cf232232d0539e7508df8ec9b216e29c2351cd9
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
520ee7bcadafdc5768fa8fc8890199ebe29886da 17-Aug-2012 Kenny Root <kroot@android.com> am a2e8365c: am 9b0da58e: Merge "Introduce a restorecon JNI binding."

* commit 'a2e8365cc883de0d3e56e9f4af350ecfe1b8fc4c':
Introduce a restorecon JNI binding.
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
554cb0c290406f5bba34908489db5382a69d0a9a 05-Jul-2012 rpcraig <rpcraig@tycho.ncsc.mil> Introduce a restorecon JNI binding.

Label the vmdl.*\.tmp files and the final .apk file differently.
Modify the WallpaperManagerService to restorecon the wallpaper file.

Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

Change-Id: Idfc056e9ec0508d7e11100626a7114f341f1af70
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
d0d7503fd3e941113094532f28986f49b11b5fdb 20-Apr-2012 Dianne Hackborn <hackbod@google.com> Move handling of package changes to a background thread.

Helps get rid of some jank when installing applications.

Change-Id: I97d0022f82d67796e334d37086e5911dd6ca6b62
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
135936072b24b090fb63940aea41b408d855a4f3 23-Mar-2012 Amith Yamasani <yamasani@google.com> User management and switching

Broadcast intents that get sent out when users are added/removed/switched.

More work on generating user-specific information in package manager queries.
APIs to update user name and query a user by id.
Removed Package.mSetStopped and mSetEnabled, since they're not user specific.

User removal:
- Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService
and AccountManager.
- Shutdown processes belonging to the user.

Don't show vibrate option in long-press power if there's no vibrator.

Lock the screen when switching users, to force unlocking.

Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
37ce3a8af6faab675319d0803b288ab1dddc76be 06-Feb-2012 Amith Yamasani <yamasani@google.com> Multi-user - wallpaper service

- Allow each user to have their own wallpaper (live or static).
- Migrate old wallpaper on upgrade.
- Update SystemBackupAgent to backup/restore from primary user's
new wallpaper directory.

Reduce dependency on Binder.getOrigCallingUser() by passing the
userId for bindService.

Change-Id: I19c8c3296d3d2efa7f28f951d4b84407489e2166
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
ebac48c6adf738cb27ea59669c9eca4467063d18 30-Nov-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5628789: Cannot set static/custom wallpaper after clearing Settings data

Need to make sure the "files" directory is created.

Change-Id: I8d5b374a5a03590a5ce7fafb5171705414f7b2f9
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
3da318202f401583cef6d548266f67c365fd1805 21-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5342788: Setting wallpaper from gallery set default...

...wallpaper first time IRK81.

We were monitoring for file creates when those are not needed, and
receiving the initial file create was causing us to be confused.

Change-Id: Iccd3b7492c82895dba87f25c4881c538f300d342
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
bf6ee4f509cbe7a44f4cc72f28e6150ca47c066d 07-Oct-2011 Christopher Tate <ctate@google.com> Fix wallpaper restore

Following a restore of the wallpaper data files, the settingsRestored()
method was binding the new wallpaper by passing null as the component,
because once upon a time that meant just use the configuration that had
just been loaded from the [newly restored] settings filed. However, at
some point this broke when the load from settings was made a staging
operation, not also the commitment of the changes.

This CL passes the newly-determined component configuration explicitly
to the bind, overriding the product default that may already have been
emplaced by the time the restore happens.

It also turns off the (minor) debugging that had been enabled in
WallpaperBackupHelper while digging into the issue.

Bug 5416839

Change-Id: I963893c236e24c75d10dde75836805295ea42cbb
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
80b902ffbe2fd5b5d3719b6fc2a8f629374968dd 16-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5317970: Removing active wallpaper from manifest crashes phone

Clean up a bunch of stuff about dealing with failures in applying
the wallpaper.

Change-Id: Ib0c7ec6cc00936dd00c752991be068dc75fc24c9
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
6ff0037792619c4441d9d3caa4f9ab4f45c11236 25-Aug-2011 Dianne Hackborn <hackbod@google.com> Merge "Fix to show the correct HW accel background in the preview window."
07213e6d8895af10951851435adf96a779863f6c 25-Aug-2011 Dianne Hackborn <hackbod@google.com> Fix to show the correct HW accel background in the preview window.

Also tweak wallpaper service to do a cleaner transition to a
static wallpaper.

Change-Id: I876a32091f92dd5a529d7fd809d3b8e730bb7d2a
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
407ec78b828173257b0c5dae221649a4ccd8b058 25-Aug-2011 Romain Guy <romainguy@google.com> Add OpenGL backend to ImageWallpaper
Bug #5204874

Currently disabled.

Change-Id: I5e7b35dce2981b0691f107e39c6394b260466543
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
9ea31639738e8d2c90dc3a4fcd535d09a0b7209a 05-Aug-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5108980 Wallpaper is not restored after upgrade from IRK32B to IRK33B

Take care of updating from old component name, and don't let this happen
again.

Also tweak how we switch between static wallpapers to avoid introducing
a 4MB allocation in the system UI process when this happens -- we now
stop the current wallpaper service and start a new one, so we get a
brand new surface that we can draw only one time in to.

Change-Id: I6fc8a42b8a46bba79759bd68fb7d0684b5d897b7
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
ba39839444532af0ed3766f736582413f6d7a40b 02-Aug-2011 Dianne Hackborn <hackbod@google.com> Move ImageWallpaper to SystemUI process.

Nice to not load 4MB bitmaps in the system process.

Also, hey, with how we are now scrolling the surface instead of
the bitmap, there is no reason to keep that 4MB bitmap loaded in
to memory. So don't.

Unfortunately it looks like for some reason the VM is still
holding on to the bitmap. I'll need to figure out why. Later.

Change-Id: Ib3503756144502fc5c8d5e294248c2417c4fe8c8
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
44bc17c6b517aef35a390c81b5aa79c4f284f744 21-Apr-2011 Dianne Hackborn <hackbod@google.com> Rework display size access.

Applications now get the display size from the window manager. No
behavior should be changed yet, this is just prep for some real
changes.

Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
a924dc0db952fe32509435fdb8dc9c84a9e181f3 17-Feb-2011 Dianne Hackborn <hackbod@google.com> Start window manager refactoring.

Move all of the pieces into a new com.android.server.wm package.

Change-Id: I942b7bcfb84ee0f843f47d58e55ffc5a93c0da94
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
fdfc1b27fe7a02d07931e6edb1d9bdae67b84eda 23-Dec-2010 Vairavan Srinivasan <vairav@codeaurora.org> frameworks/base: Fix to release references to previous live wallpaper

The service connection to the previous live wallpaper is unbound when
a new wallpaper is effective. Although the service connection is
unbound it is not disconnected and its reference to wallpaper's
service and engine is still effective. This adds up to the total
JNI references and causes dalvik (hosting system_server) to abort.
Fix is to release the references in clearWallpaperComponentLocked.

Change-Id: Idd2bab83a56d2e6c6dd7ab9be08d5e14887aa384
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
8bdf5935c0db4a66ab33a10b43398d2523cfa15d 15-Oct-2010 Dianne Hackborn <hackbod@google.com> Work on issue #3101415: Crespo apps seem to have their UID changed over time.

fsync!

Change-Id: Ie6c5397202579935ac69bf61d3e7b3081ecf269c
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
194b19a4b3ff877d2720ed35e607e329fcfa8186 14-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> Add missing wallpaper service lock.

Unimportant, but found while reading the code for other reasons.

Change-Id: I9f2fad3ff5d081aef7a35e5f33ec5de7dc92195e
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
1afd1c90ebe789b8d3a137004127a50d2db7e3b5 19-Mar-2010 Dianne Hackborn <hackbod@google.com> Maybe fix issue #2457218: Corrupt batterystats.bin file preventing phone boot - LIBtt68127

No steps to repro, but makes the code more robust by using the standard
JournaledFile class and doing sanity checks on the input it reads.

This required moving the JournaledFile class in to the framework (and
we really should get rid of either it or AtomicFile, but they have
different recovery semantics so that is tough). Also went through and
cleaned up the file management in various places.

Change-Id: Ieb7268d8435e77dff66b6e67bb63b62e5dea572e
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
c9421ba1f46d9f9aeee833e1fde2cc263b058411 12-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2492387: system server crash in WallpaperManagerService

Also move some of the important framework error logs over to Slog.

Change-Id: If6697c3e4f18498612ebd7b0e4e4f042fd713372
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
4528186e0d65fc68ef0dd1941aa2ac8aefcd55a3 06-Mar-2010 Christopher Tate <ctate@google.com> Refactor android.backup => android.app.backup

Change-Id: I0b21316ff890d7f3c7d4b82837bb60670724c2e8
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
8a9b22056b13477f59df934928c00c58b5871c95 27-Feb-2010 Joe Onorato <joeo@android.com> Switch the services library to using the new Slog
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
2269d1572e5fcfb725ea55f5764d8c3280d69f6d 25-Feb-2010 Dianne Hackborn <hackbod@google.com> Re-arrange android-common so framework no longer links with it.

This is the framework part, moving classes around so the framework
no longer needs to link to android-common. Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
21f1bd17b2dfe361acbb28453b3f3b1a110932fa 20-Feb-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2438980: Implement package watcher for voice recognizer service setting

I am getting tired of writing package monitor code, realized this is missing in
a number of places, and at this point it has gotten complicated enough that I
don't think anyone actually does it 100% right so:

Introducing PackageMonitor.

Yes there are no Java docs. I am still playing around with just what this
thing is to figure out what makes sense and how people will use it. It is
being used to fix this bug for monitoring voice recognizers (integrating the
code from the settings provider for setting an initial value), to replace
the existing code for monitoring input methods (and fix the bug where we
wouldn't remove an input method from the enabled list when it got
uninstalled), to now monitor live wallpaper package changes (now allowing
us to avoid reverting back to the default live wallpaper when the current
one is updated!), and to monitor device admin changes.

Also includes a fix so you can't uninstall an .apk that is currently enabled
as a device admin.

Also includes a fix where the default time zone was not initialized early
enough which should fix issue #2455507 (Observed Google services frame work crash).

In addition, this finally introduces a mechanism to determine if the
"force stop" button should be enabled, with convenience in PackageMonitor
for system services to handle it. All services have been updated to support
this. There is also new infrastructure for reporting battery usage as an
applicatin error report.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
f0108cda21bec61418b24aa6217406072780b5d5 22-Dec-2009 Tom Taylor <tomtaylor@google.com> resolved conflicts for merge of ad2fa35d to master

Change-Id: Ia4362cd48ac0689b91003943a4cd9660da72ff90
d4a4729c0cac582a2dcec7c8cfb316b81885a0f0 21-Dec-2009 Tom Taylor <tomtaylor@google.com> Update imports to android-common

Several files were moved to android-common. Update all the references
to import those files from the new location.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
e3ab4d0f181e875c534653dd9491d956cb3bbcd9 16-Dec-2009 Christopher Tate <ctate@google.com> Restore live wallpapers if specified in the restore data
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
a428b2c260dddd267b541909517cc4f6cf769714 16-Nov-2009 Mike Cleron <mcleron@google.com> This time for sure: make wallpapers work

Fix http://b/issue?id=2262556. Make restoring
work as well as switching between live and
non-live wallpapers. Also support live wallpaper
as default.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
d6c0b844a0eb128a9429aa01d23d15ce095ef479 14-Nov-2009 Mike Cleron <mcleron@google.com> Unbreak setting photos as wallpaper
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
322b6ee7e158b0b979d8156df8fd59f4a9b95ab9 12-Nov-2009 Mike Cleron <mcleron@google.com> Add support for making a LiveWallpaper the default
/frameworks/base/services/java/com/android/server/WallpaperManagerService.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
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
dd9b82c283815747b75fe4434c65e4b6c9c9b54f 03-Sep-2009 Dianne Hackborn <hackbod@google.com> Add better service reporting.

This will be used elsewhere.

Change-Id: Id561fa7fed5eb65446312cb697813483903d33a6
/frameworks/base/services/java/com/android/server/WallpaperManagerService.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
/frameworks/base/services/java/com/android/server/WallpaperManagerService.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.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
cbf15048240ecf460957ac3de98a7efbccbbb754 19-Aug-2009 Dianne Hackborn <hackbod@google.com> Don't call onSurfaceChanged() if nothing interesting has changed.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
e9e9bca842473f2e9d343d4248be98f8731a79d1 19-Aug-2009 Dianne Hackborn <hackbod@google.com> More wallpaper fixes: scroll position, visibility, leaking.

This fixes a bunch of edge cases in updating the wallpaper's scroll position
and visibility when switching between wallpapers and traveling through the UI.

It also fixes some leaks of wallpaper tokens and windows.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.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.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
b1ac1a86dc656a3f27ab1256641b46f89ac1cb47 14-Aug-2009 Dianne Hackborn <hackbod@google.com> Turn off static live wallpaper for now.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
0cd48879dca53a9f4d449126d406527bc4b94baf 14-Aug-2009 Dianne Hackborn <hackbod@google.com> A little more wallpaper robustness.

- Recover if a live wallpaper is crashing repeatedly.
- Don't crash when someone tries to set a static wallpaper.
- Make the static wallpaper update correctly when the image changes.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java
f21adf6fc19bc9c6908c6f1aaae203389f104bfa 13-Aug-2009 Dianne Hackborn <hackbod@google.com> Always have a wallpaper service running.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.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.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.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.
/frameworks/base/services/java/com/android/server/WallpaperManagerService.java