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

Commit 5ee743ee authored by Martin Kosiba's avatar Martin Kosiba Committed by Marcin Kosiba
Browse files

Ensure the WebView provider is created onVisibilityChanged.

It is possible for onVisibilityChanged to be called during
WebView construciton.

BUG=7622923

Change-Id: Ie87dae537e1e6dd44d96e9e56982abbc134a31a0
parent 74fbeb48
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1957,9 +1957,8 @@ public class WebView extends AbsoluteLayout
    @Override
    public void setOverScrollMode(int mode) {
        super.setOverScrollMode(mode);
        // This method may called in the constructor chain, before the WebView provider is
        // created. (Fortunately, this is the only method we override that can get called by
        // any of the base class constructors).
        // This method may be called in the constructor chain, before the WebView provider is
        // created.
        ensureProviderCreated();
        mProvider.getViewDelegate().setOverScrollMode(mode);
    }
@@ -2119,6 +2118,9 @@ public class WebView extends AbsoluteLayout
    @Override
    protected void onVisibilityChanged(View changedView, int visibility) {
        super.onVisibilityChanged(changedView, visibility);
        // This method may be called in the constructor chain, before the WebView provider is
        // created.
        ensureProviderCreated();
        mProvider.getViewDelegate().onVisibilityChanged(changedView, visibility);
    }