cleanup of binding and starting TorService

This commit is contained in:
Nathan Freitas 2012-01-16 22:56:26 -05:00
parent b03cd1a57f
commit d35fb1bda2
1 changed files with 11 additions and 12 deletions

View File

@ -72,8 +72,10 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
//if Tor binary is not running, then start the service up
//might want to look at whether we need to call this every time
//or whether binding to the service is enough
//bindService();
startService(new Intent(INTENT_TOR_SERVICE));
//something to play with on the UI branch
setTheme(android.R.style.Theme_Black_NoTitleBar);
@ -340,7 +342,6 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
bindService();
updateStatus("");
if (getIntent() == null)
return;
@ -556,7 +557,6 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
hideProgressDialog();
String lblMsg = getString(R.string.status_activated);
//+ "\n" + torServiceMsg;
lblStatus.setText(lblMsg);
@ -802,7 +802,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
mService.registerCallback(mCallback);
//again with the update status?!? :P
updateStatus("");
updateStatus(null);
if (autoStartOnBind)
{
@ -852,7 +852,6 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
}
//unbind removes the callback, and unbinds the service
/*
private void unbindService ()
{
if (mIsBound) {
@ -876,7 +875,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
mIsBound = false;
}
}*/
}
private void createProgressDialog (String msg)
{