Bug 1063541 - Destory singleton NetworkManager object when requested. r=mfinkle
--- a/mobile/android/base/GeckoNetworkManager.java
+++ b/mobile/android/base/GeckoNetworkManager.java
@@ -32,21 +32,22 @@ import android.util.Log;
* Current connection is firstly obtained from Android's ConnectivityManager,
* which is represented by the constant, and then will be mapped into the
* connection type defined in Network Information API version 3.
*/
public class GeckoNetworkManager extends BroadcastReceiver implements NativeEventListener {
private static final String LOGTAG = "GeckoNetworkManager";
- static private final GeckoNetworkManager sInstance = new GeckoNetworkManager();
+ static private GeckoNetworkManager sInstance = new GeckoNetworkManager();
public static void destroy() {
if (sInstance != null) {
sInstance.onDestroy();
+ sInstance = null;
}
}
// Connection Type defined in Network Information API v3.
private enum ConnectionType {
CELLULAR(0),
BLUETOOTH(1),
ETHERNET(2),