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,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 {