commit 069a9bf37787db477753787cb19c0b638a3eb0a5 Author: Nathan Freitas nathan@freitas.net Date: Thu Jan 9 15:28:53 2014 -0500
fixes #2847 use class name to start service --- src/org/torproject/android/Orbot.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java index 15a3a1c..ad6e488 100644 --- a/src/org/torproject/android/Orbot.java +++ b/src/org/torproject/android/Orbot.java @@ -88,8 +88,6 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick setLocale();
- startService(new Intent(INTENT_TOR_SERVICE)); - doLayout(); } @@ -1054,10 +1052,15 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick //this is where we bind! private void bindService () { + + Intent iTorService = new Intent(ITorService.class.getName()); + + getApplication().getApplicationContext().startService(iTorService); + //since its auto create, we prob don't ever need to call startService //also we should again be consistent with using either iTorService.class.getName() //or the variable constant - bindService(new Intent(ITorService.class.getName()), + bindService(iTorService, mConnection, Context.BIND_AUTO_CREATE);
mIsBound = true;