Revert "Revert onSurfaceRedrawNeeded behavior"

This reverts commit d51863e994.

Reason for revert: Caused b/116859106
Fixes: 116859106

Change-Id: I12de0aa8d71164da29e3d40b4e0bd847c70f680c
This commit is contained in:
Lucas Dupin
2018-10-01 15:56:20 +00:00
parent d51863e994
commit d511605f9f

View File

@@ -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();
}