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

Commit b62f8a54 authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Fix potential NPE in L10nUtils.

It is possible that a call to the L10nUtils class will
come before it has been properly initialised (if the
user highlights a form very quickly onload for example) so move
the initialisation earlier in the WebView ctor so that it is
set up before the WebCore thread is started.

Change-Id: Iff5a1c16d04c47d001146184f753d2cc0cbbb404
parent 1ca56263
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -906,6 +906,7 @@ public class WebView extends AbsoluteLayout

        mCallbackProxy = new CallbackProxy(context, this);
        mViewManager = new ViewManager(this);
        L10nUtils.loadStrings(context);
        mWebViewCore = new WebViewCore(context, this, mCallbackProxy, javascriptInterfaces);
        mDatabase = WebViewDatabase.getInstance(context);
        mScroller = new Scroller(context);
@@ -922,7 +923,6 @@ public class WebView extends AbsoluteLayout
            startPrivateBrowsing();
        }

        L10nUtils.loadStrings(context);
        mAutoFillData = new WebViewCore.AutoFillData();
    }