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

Commit ef940062 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Do not reload bitmap unless necessary

Let's just wait until the current async task finishes,
the engine will be recreated if the bitmap changes.

Test: Set wallpaper, no black frame
Change-Id: Icad8c18095119e9e035efc04704bc6d2d35af6d9
Fixes: 63065764
parent 6a6d63be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ public class ImageWallpaper extends WallpaperService {
            // Load background image dimensions, if we haven't saved them yet
            if (mBackgroundWidth <= 0 || mBackgroundHeight <= 0) {
                // Need to load the image to get dimensions
                loadWallpaper(forDraw, true /* needsReset */);
                loadWallpaper(forDraw, false /* needsReset */);
                if (DEBUG) {
                    Log.d(TAG, "Reloading, redoing updateSurfaceSize later.");
                }