Bug 1063541 - Destory singleton NetworkManager object when requested. r=mfinkle
authorwesj <wjohnston@mozilla.com>
Thu, 25 Sep 2014 13:05:00 -0700
changeset 207446 eafd15b593cfc305ebecaff75ab9262588faed32
parent 207445 b9fad08dc0be1091866edd039b40e80d379e970c
child 207447 3d08daf2b5008e323ef2c1b011145df327d4296b
push id9016
push userwjohnston@mozilla.com
push dateFri, 26 Sep 2014 18:40:06 +0000
treeherderfx-team@eafd15b593cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1063541
milestone35.0a1
Bug 1063541 - Destory singleton NetworkManager object when requested. r=mfinkle
mobile/android/base/GeckoNetworkManager.java
--- 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),