Bug 1074189 - Lazily create GeckoNetworkManager r=mfinkle

This commit is contained in:
Wes Johnston 2014-09-29 13:51:00 -07:00
parent d04312842e
commit 894158235f

View File

@ -37,7 +37,7 @@ import android.util.Log;
public class GeckoNetworkManager extends BroadcastReceiver implements NativeEventListener {
private static final String LOGTAG = "GeckoNetworkManager";
static private GeckoNetworkManager sInstance = new GeckoNetworkManager();
static private GeckoNetworkManager sInstance;
public static void destroy() {
if (sInstance != null) {
@ -90,6 +90,10 @@ public class GeckoNetworkManager extends BroadcastReceiver implements NativeEven
private volatile Context mApplicationContext;
public static GeckoNetworkManager getInstance() {
if (sInstance == null) {
sInstance = new GeckoNetworkManager();
}
return sInstance;
}