Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2b8f947 authored by Michael Jurka's avatar Michael Jurka Committed by The Android Automerger
Browse files

Fix issue where static wallpaper was offset on boot

Bug: 6447391

Change-Id: Ie89bfdfd81dbf80ad7d109717f83c4bc7b42acf1
parent c71006ed
Loading
Loading
Loading
Loading
+10 −9
Original line number Original line Diff line number Diff line
@@ -281,9 +281,16 @@ public class ImageWallpaper extends WallpaperService {
                return;
                return;
            }
            }


            if (mBackgroundWidth < 0 || mBackgroundHeight < 0) {
            // If we don't yet know the size of the wallpaper bitmap,
            // If we don't yet know the size of the wallpaper bitmap,
            // we need to get it now.
            // we need to get it now.
            boolean updateWallpaper = mBackgroundWidth < 0 || mBackgroundHeight < 0 ;

            // If we somehow got to this point after we have last flushed
            // the wallpaper, well we really need it to draw again.  So
            // seems like we need to reload it.  Ouch.
            updateWallpaper = updateWallpaper || mBackground == null;

            if (updateWallpaper) {
                updateWallpaperLocked();
                updateWallpaperLocked();
            }
            }


@@ -308,12 +315,6 @@ public class ImageWallpaper extends WallpaperService {
            mLastXTranslation = xPixels;
            mLastXTranslation = xPixels;
            mLastYTranslation = yPixels;
            mLastYTranslation = yPixels;


            if (mBackground == null) {
                // If we somehow got to this point after we have last flushed
                // the wallpaper, well we really need it to draw again.  So
                // seems like we need to reload it.  Ouch.
                updateWallpaperLocked();
            }


            if (mIsHwAccelerated) {
            if (mIsHwAccelerated) {
                if (!drawWallpaperWithOpenGL(sh, availw, availh, xPixels, yPixels)) {
                if (!drawWallpaperWithOpenGL(sh, availw, availh, xPixels, yPixels)) {