History log of /frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3368a63c640c059b85b39c7def8f9c63ad921cb5 18-Dec-2013 Michael Jurka <mikejurka@google.com> Change wallpaper sizing

Bug: 11997581

- ignore suggested dimensions
- when orientation changes, scale up wallpaper if
it doesn't fill the whole screen, or scale back to
original size if not necessary

Change-Id: I75b7519a105d4097bf7a35cd8af61fc40f45f8fb
(cherry picked from commit 824a4b5ea4c58592b9b2ebe787f5fb6974e7cabe)
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
b9fca9997100f209e98f0559c54c875b9e661e9f 15-Oct-2013 Michael Wright <michaelwr@google.com> Force the wallpaper to reload when dimensions change

Currently it's possible for the home application to suggest new
wallpaper dimensions and the WallpaperService to request the bitmap
between when the new dimensions have been propagated and the old
bitmap has been forgotten. This leads to the WallpaperService
drawing a Bitmap with the old dimensions into a Surface with the new
dimensions.

By forcing the WallpaperManager to forget the old Bitmap immediately
before we reload it, we can ensure that we always have a Bitmap of
the correct size.

Bug: 10853302
Change-Id: I298ac5f3f8bcde54eeb1e45d21bf2ba3cbb618c9
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
209bede6b9edb9171e5bee4077b48e35004a37b4 17-Jul-2013 John Spurlock <jspurlock@google.com> Remove trailing whitespace from system ui.

Baseline existing .java files, no excuses going forward.

Change-Id: I4bd0f25bbda6f2ec832e34ef5c70d4830bf07f99
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
de84f0e77ea2bf713d15c290264059a413c2486a 12-Jun-2013 John Spurlock <jspurlock@google.com> Organize the imports in systemui.

To follow android conventions, more importantly to remove the
unused.

Change-Id: I75881718e84360a579a3b02c26489ad250bc9227
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
b432ef98f0dd433689f8bf74bbf44499e29d08f1 01-May-2013 Chet Haase <chet@google.com> Speed up user-switching wallpaper changes

Previous work in ImageWallpaper cached the bitmap for a user
to avoid reloading it (an expensive operation on large-display devices)
when we could simply re-use it. User switching still caused a reload, however,
since the place where we cache the bitmap (ImageWallpaper) is in an instance
that is re-created on user-switch.

A simple fix is to have the ImageWallpaper stop telling the WallpaperManager
to erase its own cache of the bitmap prior to re-loading it. That step is
unnecessary, since a bitmap that is cached can be assumed to be valid. A wallpaper
change will correctly null out that cached version, so if the cached bitmap
is non-null, then we can simply use it as-is.

The fix is to remove the call to forgetLoadedWallpaper() and allow the caching
mechanism to do its job.

Issue #7986933 user switching on lock screen is slow (sometimes like molasses)

Change-Id: I447754ab85337bc8ae59b4ad6c3e6c2b30e13735
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
2e417be5c4d45ae041c0046570d117d7b0d71940 14-Mar-2013 Chet Haase <chet@google.com> Better fix for GL wallpaper creation

A previous fix made initializing GL work better by calling eglMakeCurrent()
prior to querying the max texture size. However, that fix worked by creating an eglSurface
earlier than we did before, which for some reason causes problems later if wallpaper creation
fails and we back off to a software solution.

This new fix creates a temporary pbuffer surface instead, which still allows us to make the
call to eglMakeCurrent() prior to querying the max texture size, but does not result in the
later canvas lock failure if the wallpaper creation fails anyway.

Issue #8319960 sluggish yakju animations over launcher

Change-Id: I394d672549260a354f03ad9fd1b9e1f9a161a371
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
187e1e2fc7dfb4eabdcb2c8990774bc6020fb16b 14-Mar-2013 Chet Haase <chet@google.com> Ensure wallpaper creation succeeds

ImageWallpaper was sometimes querying GL for a max texture size too early
(before the first call to eglMakeCurrent()). This problem caused the wallpaper
to then get created in software, resulting in noticeably slower performance
when the wallpaper was visible.

This fix ensures that the
makeCurrent happens before the query, ensuring that wallpapers of the right
size actually get created instead of failing due to this error at creation time.

Issue #8319960 sluggish yakju animations over launcher

Change-Id: I12a3eba9f1818bdf544691e0727fe12f7e820651
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
d9731a57c631a5218819dbb02755c4dd41e7cc44 27-Feb-2013 Romain Guy <romainguy@android.com> am bf53be46: am 09353f74: Merge "Check and fail early if requested wallpaper size exceeds maximum texture size."

* commit 'bf53be46d237866a9964a4f1fa960eb6ef4a70a6':
Check and fail early if requested wallpaper size exceeds maximum texture size.
c8d983f7259b4e328abc10c27c3c2cec61ad0722 20-Feb-2013 Romain Guy <romainguy@google.com> Wallpaper software rendering fallback
Bug #8230579

If the wallpaper fails to render with OpenGL, fall back to software
rendering instead of throwing an exception and crashing the wallpaper.

Change-Id: I40ed6056e6ea09b92b6cd441f16101dcc296fb8e
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
9549c067d93bd87aa28d1d6d44fdb8d75b2fd276 07-Feb-2013 Wim Vander Schelden <wim.vander.schelden@philips.com> Check and fail early if requested wallpaper size exceeds maximum texture size.

This fixes an issue where OpenGL initialization succeeds but buffer allocation fails because the requested wallpaper size
is too large (or otherwise unsupported) by the graphics hardware. This fixes an issue where SystemUI crashes constantly
on the PandaBoard when connected to a full HD display. Tested only on PandaBoard, no access to alternative hardware.
Signed-off-by: Wim Vander Schelden <wim.vander.schelden@philips.com>

Change-Id: I8d2e1ae9fd9772977c4e365f23f2f58bbca3787c
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
3696779bca4e5bc1b60c056db6f892e72e51a20f 28-Jan-2013 Romain Guy <romainguy@google.com> Reinitialize hardware renderer after eglTerminate()
Bug #8066455

ViewRootImpl was properly detecting that the renderer was not
ready to draw but would simply schedule another frame, thus sending
the systemui into an inifite redraw loop. This change reinitializes
the renderer if needed (if the renderer is requested but not enabled.)

This CL also fixes an issue caused by the default wallpaper. Since it
never calls eglTerminate(), managed contexts are never reclaimed.

Change-Id: Idb8caa672be8ee35f6e6a7e942d9abd8aa100967
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.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
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
589a6af173c10738d2a83c69a9dda36579cc739d 25-Oct-2012 Chet Haase <chet@google.com> Set wallpaper bitmap reference to null before reloading

Give the GC a chance to collect the current bitmap if it needs to,
as it allocates memory for the next one. This helps avoid OOM situations
that can sometimes occur in extreme circumstances (huge bitmaps)

Also set the default_wallpaper to the right default size.

Issue #7352961 Wallpaper edge is cut-off while scrolling through home page

Change-Id: If76b55061d04b29af7f66a6162e307b8b53bf4ae
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
5f0d976b37b919b74509b6f22e4ad3fa56422f6c 18-Oct-2012 Chet Haase <chet@google.com> Track size changes correctly for static wallpapers

Previous logic compared the surface size to the bitmap size to determine
whether to reload the bitmap. This was based on an assumption that the bitmap
would be created at the same sizea s the surface. However, the process of
how those sizes get determined is different for surfaces and wallpapers, causing
an occasional issue where the bitmap gets reloaded frequently, every time the wallpaper
is asked to redraw, even though it always gets recreated at the same size.

New logic checks previous surface dimensions against current surface dimensions to
determine whether the bitmap should be reloaded; we really only want to reload
it when the surface size changes.

Issue #7373200 pause when toggling between All Apps and Home screen; Home button stays illuminated for a long time

Change-Id: I108777b72bd42616ad7cf8274af1b3e6b2ed94e7
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
8481ac8fe99e080a83e6bd5e4f1e656d3b950083 18-Oct-2012 Chet Haase <chet@google.com> Stop reloading wallpaper bitmap

Typo in ImageWallpaper made a dimension check incorrect.

Issue#7373200 pause when toggling between All Apps and Home screen; Home button stays illuminated for a long time

Change-Id: I82763ac8c9ed564eba904f552975ab20c8aef932
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
2f20081f9fd734e466147bf1091d06cc7331458c 11-Oct-2012 Chet Haase <chet@google.com> Avoid redundant wallpaper loading/drawing

Switching users causes wallpapers to get recreated 3 times. Other operations
like startup and rotation cause similar redundant load/draw operations. This change
tracks the various attributes that tell us when we really need to reload
and redraw, causing only one of these expensive operation per one of these
switches.

Issue #7334664 Wallpaper draws several times when switching users

Change-Id: Ic3072ef3a7eaf622d8632e87e34f50999f716c39
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
8efca54693b1fa956eede0367fffe8bb0d3531f0 16-Oct-2012 Romain Guy <romainguy@google.com> Ensure we always request conformant OpenGL ES 2.0 contexts

Change-Id: I6b9d6f2dace02ad28baef6811007302b8e552a54
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
c92f150af0fb93b677a4ec6e2aca1b9a9bdd8760 14-Oct-2012 Craig Mautner <cmautner@google.com> Fix wallpaper not updating on initial boot.

Update the wallpaper and redraw it unconditionally when the surface
changes. Previously we were not updating the wallpaper when the
surface changed which meant that it remained at the original surface
dimensions. Also, the indication that it was visible comes in too
late to display it cleanly without jank.

Bug: 7310334 fixed.
Change-Id: Ic2ae95ea0b0704183053da1d7a906818651c62c9
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
c61d70ec46bc44344a419a0a15ccbecd1f8f1a2d 11-Oct-2012 Chet Haase <chet@google.com> Cache wallpaper bitmap to avoid re-loading on rotation

Screen rotations force static wallpapers to get recreated. One of the things
that happens is that the underlying bitmap resource is loaded. This can be quite
expensive for large bitmaps (which is the case on large-display devices).
A simple optimization is to retain the bitmap in the wallpaper process, to avoid
this re-loading step. We still re-draw and re-upload the texture, but at least
we don't re-load the thing.

Issue #7324823 Manta wallpaper decode performance is atrocious

Change-Id: I0748e275a55992d13704a7dec5910d2dbdc9e2a4
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
fb729c7b4420eacbc65a958beb53511ff59ba3e6 01-Oct-2012 Craig Mautner <cmautner@google.com> Redraw static wallpapers when a redraw is needed.

Bug: 7242944
Change-Id: I913e3486de77468e73da79b4d83be3cf4f1547dd
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
881f0b1ee0e712e7309555826a4e5426238dcefe 05-Sep-2012 Michael Jurka <mikejurka@google.com> Remove unneeded imports
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
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
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
40d4676eab24e104728981bf1059d2211fbf28d1 21-Jun-2012 Michael Jurka <mikejurka@google.com> Remove duplicate code to update wallpaper
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
e673396387466cd70d059ae75c7b069c9ced670a 18-May-2012 Michael Jurka <mikejurka@google.com> resolved conflicts for merge of ede4d56e to jb-dev-plus-aosp

Change-Id: I8893e819f0f814a1fe1e0fb7f70dba860e889135
321357b6066a34cc12a0528b7b835c7664db2e08 17-May-2012 Michael Jurka <mikejurka@google.com> Fix issue where static wallpaper was offset on boot

Bug: 6447391

Change-Id: Ie89bfdfd81dbf80ad7d109717f83c4bc7b42acf1
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
e7339d804dc91427330abe192ebbb6bcd56b822c 05-May-2012 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of acb5f383 to jb-dev-plus-aosp

Change-Id: I79f0394b20a61dc7e6faabdb74c66277f71dfcb3
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
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
2b1bcca531ba3fb1959dca1d1227ddef6c204a00 07-Feb-2012 SangWook Han <swhan@nemustech.com> ImageWallpaper : get bitmap width before calc screen offset

Inside drawFrameLocked, updateWallpaperLocked() is called after
calculae drawing offset using mBackgroundWidth/Height. Because
mBackgroundWidth/Height is modified inside updateWallpaperLocked(),
it sould be called before Mbackgroundwidth/Height is used.

Many market launcher and some phone vendor launcher call
suggestDesiredDimenstions with argument (w,h) instead aosp's
original (w*2,h) for single page wallpaper. In that case, when
launcher orientation changed, ImageWallpaper does not properly
display wallpaper image and mostly you can see Black Edge at
left.

Change-Id: I93ebc4337b01f73d3154346943afa4afd6b1988a
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.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
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
043a6b1e5709c46cb8094766c792ec57d3fd97df 28-Sep-2011 Romain Guy <romainguy@google.com> Don't use OpenGL ES 2.0 to render the wallpaper on the emulator.
Bug #5352896

The emulator doesn't support OpenGL ES 2.0.

Change-Id: I7f647d78d4d8ad87d12a5f009d5d37f6aeaecf72
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
f929629e74fe84b986f76db448b9c95d72b2903e 26-Aug-2011 Romain Guy <romainguy@google.com> Fix crash with OpenGL wallpaper
Bug #5216751

Change-Id: Ieb2c0e3b29a0673a5127692c9740ba59c879a3c2
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
881fb2092b41f4447e708da2f341d2ca5602c0d4 25-Aug-2011 Erik Gilling <konkers@android.com> systemui: enable GL rendering of launch background

Only affect high end devices

Change-Id: I5fa2b646c2c4d4350fb4fc1042741c981ebb30bb
Signed-off-by: Erik Gilling <konkers@android.com>
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
407ec78b828173257b0c5dae221649a4ccd8b058 25-Aug-2011 Romain Guy <romainguy@google.com> Add OpenGL backend to ImageWallpaper
Bug #5204874

Currently disabled.

Change-Id: I5e7b35dce2981b0691f107e39c6394b260466543
/frameworks/base/packages/SystemUI/src/com/android/systemui/ImageWallpaper.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/packages/SystemUI/src/com/android/systemui/ImageWallpaper.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/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java