From d511605f9f7beea50f9002baef841ab5176b02ac Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Mon, 1 Oct 2018 15:56:20 +0000 Subject: [PATCH] Revert "Revert onSurfaceRedrawNeeded behavior" This reverts commit d51863e994987a93cfcebf80410ae388f09a1f3c. Reason for revert: Caused b/116859106 Fixes: 116859106 Change-Id: I12de0aa8d71164da29e3d40b4e0bd847c70f680c --- .../SystemUI/src/com/android/systemui/ImageWallpaper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java index 408e599bc2892..77f4bf529f21b 100644 --- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java @@ -256,6 +256,12 @@ public class ImageWallpaper extends WallpaperService { Log.d(TAG, "onSurfaceRedrawNeeded"); } super.onSurfaceRedrawNeeded(holder); + // At the end of this method we should have drawn into the surface. + // This means that the bitmap should be loaded synchronously if + // it was already unloaded. + if (mBackground == null) { + updateBitmap(mWallpaperManager.getBitmap(true /* hardware */)); + } mSurfaceRedrawNeeded = true; drawFrame(); }