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

Commit 6b91b45e authored by Kristian Monsen's avatar Kristian Monsen
Browse files

Only store Application context

Context from an Activity are not meant to be store past the
lifetime of the Activity.

Fix for bug 3306898

Change-Id: Ib2f12cbdc3ec8aa0a6adf4770e6be4569fa6402c
parent 28104e1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class JniUtil {
        if (initialized)
            return;

        sContext = context;
        sContext = context.getApplicationContext();
        initialized = true;
    }

+1 −1
Original line number Diff line number Diff line
@@ -1005,7 +1005,7 @@ public class WebView extends AbsoluteLayout
    private static void setupProxyListener(Context context) {
        IntentFilter filter = new IntentFilter();
        filter.addAction(Proxy.PROXY_CHANGE_ACTION);
        Intent currentProxy = context.registerReceiver(new ProxyReceiver(), filter);
        Intent currentProxy = context.getApplicationContext().registerReceiver(new ProxyReceiver(), filter);
        if (currentProxy != null) {
            handleProxyBroadcast(currentProxy);
        }