[tor-commits] [orbot/master] unbind the service when the activity is destroyed

n8fr8 at torproject.org n8fr8 at torproject.org
Tue Jun 24 14:12:39 UTC 2014


commit bb0b7e8fe29b80f8dcd4a83cb183a5d6fbaf3edc
Author: Nathan Freitas <nathan at freitas.net>
Date:   Tue Jun 24 10:06:26 2014 -0400

    unbind the service when the activity is destroyed
    we don't want leaky services
---
 src/org/torproject/android/Orbot.java |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index f7e0f95..5e6a955 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -111,11 +111,10 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
 		torService = new Intent(this, TorService.class);    	    	
 		startService(torService);
 		
-
 		bindService(torService,
 				mConnection, Context.BIND_AUTO_CREATE);
 		
-	
+		
 	}
 	
 	private void doLayout ()
@@ -1261,7 +1260,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
 	protected void onDestroy() {
 		super.onDestroy();
 		
-		//unbindService();
+		unbindService(mConnection);
 	}
 
 	public class DataCount {





More information about the tor-commits mailing list