unbind the service when the activity is destroyed

we don't want leaky services
This commit is contained in:
Nathan Freitas 2014-06-24 10:06:26 -04:00
parent 247e2ed86d
commit bb0b7e8fe2
1 changed files with 2 additions and 3 deletions

View File

@ -111,7 +111,6 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
torService = new Intent(this, TorService.class); torService = new Intent(this, TorService.class);
startService(torService); startService(torService);
bindService(torService, bindService(torService,
mConnection, Context.BIND_AUTO_CREATE); mConnection, Context.BIND_AUTO_CREATE);
@ -1261,7 +1260,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
//unbindService(); unbindService(mConnection);
} }
public class DataCount { public class DataCount {