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

Commit e47ac47d authored by Grace Kloba's avatar Grace Kloba
Browse files

If the Picture is not ready, just draw the background

and return. This should help to avoid the flash in gm.

Fix http://b/issue?id=2494990
parent ef5a8e5b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3115,6 +3115,14 @@ public class WebView extends AbsoluteLayout
            return;
        }

        // if both mContentWidth and mContentHeight are 0, it means there is no
        // valid Picture passed to WebView yet. This can happen when WebView
        // just starts. Draw the background and return.
        if ((mContentWidth | mContentHeight) == 0 && mHistoryPicture == null) {
            canvas.drawColor(mBackgroundColor);
            return;
        }

        int saveCount = canvas.save();
        if (mInOverScrollMode
                && getSettings().getUseSystemOverscrollBackground()) {