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

Commit f676400e authored by Patrik Torstensson's avatar Patrik Torstensson
Browse files

Fix race condition between loading wallpaper and unloading.

Only happes in non-hw accelerated case.

Test: Tested on MTK reference device (non-highend-gfx)
Fixes: 36639666
Change-Id: Idf510df65d6e4a2e9d971b87027524051995b899
parent 8683062a
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -405,10 +405,7 @@ public class ImageWallpaper extends WallpaperService {
                    }
                } else {
                    drawWallpaperWithCanvas(sh, availw, availh, xPixels, yPixels);
                }
            } finally {
                Trace.traceEnd(Trace.TRACE_TAG_VIEW);
                if (FIXED_SIZED_SURFACE && !mIsHwAccelerated) {
                    if (FIXED_SIZED_SURFACE) {
                        // If the surface is fixed-size, we should only need to
                        // draw it once and then we'll let the window manager
                        // position it appropriately.  As such, we no longer needed
@@ -417,6 +414,9 @@ public class ImageWallpaper extends WallpaperService {
                        unloadWallpaper(false /* forgetSize */);
                    }
                }
            } finally {
                Trace.traceEnd(Trace.TRACE_TAG_VIEW);
            }
        }

        /**