fixes #2847 use class name to start service
This commit is contained in:
parent
2735a59151
commit
069a9bf377
|
@ -88,8 +88,6 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick
|
||||||
|
|
||||||
setLocale();
|
setLocale();
|
||||||
|
|
||||||
startService(new Intent(INTENT_TOR_SERVICE));
|
|
||||||
|
|
||||||
doLayout();
|
doLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1054,10 +1052,15 @@ public class Orbot extends SherlockActivity implements TorConstants, OnLongClick
|
||||||
//this is where we bind!
|
//this is where we bind!
|
||||||
private void bindService ()
|
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
|
//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()
|
//also we should again be consistent with using either iTorService.class.getName()
|
||||||
//or the variable constant
|
//or the variable constant
|
||||||
bindService(new Intent(ITorService.class.getName()),
|
bindService(iTorService,
|
||||||
mConnection, Context.BIND_AUTO_CREATE);
|
mConnection, Context.BIND_AUTO_CREATE);
|
||||||
|
|
||||||
mIsBound = true;
|
mIsBound = true;
|
||||||
|
|
Loading…
Reference in New Issue