unbind the service when the activity is destroyed
we don't want leaky services
This commit is contained in:
parent
247e2ed86d
commit
bb0b7e8fe2
|
@ -111,11 +111,10 @@ 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);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doLayout ()
|
private void doLayout ()
|
||||||
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue