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

Commit 23a446cf authored by John Reck's avatar John Reck
Browse files

Fix onFirstLayout path for saved pages

 Bug: 5464993
 Saved pages are taking the onFirstLayout path in
 onConfigurationChange incorrectly. Fix that by clearing out the
 view state after actual first layout.

Change-Id: I61578f35ee6be349df49a63c464f532e0a87df28
parent 39268ffc
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1917,6 +1917,7 @@ public class WebView extends AbsoluteLayout
            mLoadedPicture = ViewStateSerializer.deserializeViewState(stream, this);
            mBlockWebkitViewMessages = true;
            setNewPicture(mLoadedPicture, true);
            mLoadedPicture.mViewState = null;
            return true;
        } catch (IOException e) {
            Log.w(LOGTAG, "Failed to loadViewState", e);
@@ -4355,8 +4356,10 @@ public class WebView extends AbsoluteLayout
            selectionDone();
        }
        mOrientation = newConfig.orientation;
        if (mWebViewCore != null && !mBlockWebkitViewMessages) {
            mWebViewCore.sendMessage(EventHub.CLEAR_CONTENT);
        }
    }

    /**
     * Keep track of the Callback so we can end its ActionMode or remove its