[tor-commits] [orbot/master] renable the network state receiver code

n8fr8 at torproject.org n8fr8 at torproject.org
Wed Dec 3 14:36:57 UTC 2014


commit 09bdd8fd29a7c4086f9f95ab214e0bc77166a6f7
Author: Nathan Freitas <nathan at freitas.net>
Date:   Wed Dec 3 09:36:35 2014 -0500

    renable the network state receiver code
---
 src/org/torproject/android/service/TorService.java |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index f1fd6e6..63bf0d5 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -444,7 +444,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
 		Log.d(TAG, msg);
 		sendCallbackLogMessage(msg);
     		
-       // unregisterReceiver(mNetworkStateReceiver);        
+		unregisterReceiver(mNetworkStateReceiver);        
         
         clearNotifications ();
 
@@ -624,9 +624,8 @@ public class TorService extends Service implements TorServiceConstants, TorConst
 			if (mNotificationManager == null)
 			{
 	    	   
-	 		//   IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
-	 		 // mNetworkStateFilter.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
-	 		  // registerReceiver(mNetworkStateReceiver , mNetworkStateFilter);
+			   IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);			   
+	 		   registerReceiver(mNetworkStateReceiver , mNetworkStateFilter);
 	 	
 	 		   mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
 	 		



More information about the tor-commits mailing list