handle CONNECTING state properly
This commit is contained in:
parent
6ed7ab0d6d
commit
cbf4e99d32
|
@ -878,19 +878,16 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
||||||
|
|
||||||
if (newTorStatus == TorServiceConstants.STATUS_ON)
|
if (newTorStatus == TorServiceConstants.STATUS_ON)
|
||||||
{
|
{
|
||||||
//if (torStatus != newTorStatus)
|
|
||||||
//{
|
imgStatus.setImageResource(R.drawable.toron);
|
||||||
imgStatus.setImageResource(R.drawable.toron);
|
|
||||||
// mViewMain.setBackgroundResource(R.drawable.onionrootonly);
|
String lblMsg = getString(R.string.status_activated);
|
||||||
|
lblStatus.setText(lblMsg);
|
||||||
String lblMsg = getString(R.string.status_activated);
|
|
||||||
lblStatus.setText(lblMsg);
|
|
||||||
|
|
||||||
if (mItemOnOff != null)
|
if (mItemOnOff != null)
|
||||||
mItemOnOff.setTitle(R.string.menu_stop);
|
mItemOnOff.setTitle(R.string.menu_stop);
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
if (mTorServiceMsg != null && mTorServiceMsg.length() > 0)
|
if (mTorServiceMsg != null && mTorServiceMsg.length() > 0)
|
||||||
{
|
{
|
||||||
appendLogTextAndScroll(mTorServiceMsg);
|
appendLogTextAndScroll(mTorServiceMsg);
|
||||||
|
@ -921,14 +918,12 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
||||||
}
|
}
|
||||||
else if (newTorStatus == TorServiceConstants.STATUS_CONNECTING)
|
else if (newTorStatus == TorServiceConstants.STATUS_CONNECTING)
|
||||||
{
|
{
|
||||||
if (torStatus != newTorStatus)
|
|
||||||
{
|
imgStatus.setImageResource(R.drawable.torstarting);
|
||||||
imgStatus.setImageResource(R.drawable.torstarting);
|
|
||||||
// mViewMain.setBackgroundResource(R.drawable.onionrootonlygold);
|
if (mItemOnOff != null)
|
||||||
|
mItemOnOff.setTitle(R.string.menu_stop);
|
||||||
if (mItemOnOff != null)
|
|
||||||
mItemOnOff.setTitle(R.string.menu_stop);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lblStatus != null && mTorServiceMsg != null)
|
if (lblStatus != null && mTorServiceMsg != null)
|
||||||
if (mTorServiceMsg.indexOf('%')!=-1)
|
if (mTorServiceMsg.indexOf('%')!=-1)
|
||||||
|
@ -940,7 +935,6 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
||||||
}
|
}
|
||||||
else if (newTorStatus == TorServiceConstants.STATUS_OFF)
|
else if (newTorStatus == TorServiceConstants.STATUS_OFF)
|
||||||
{
|
{
|
||||||
// mViewMain.setBackgroundResource(R.drawable.onionrootonlygrey);
|
|
||||||
imgStatus.setImageResource(R.drawable.toroff);
|
imgStatus.setImageResource(R.drawable.toroff);
|
||||||
lblStatus.setText(getString(R.string.status_disabled) + "\n" + getString(R.string.press_to_start));
|
lblStatus.setText(getString(R.string.status_disabled) + "\n" + getString(R.string.press_to_start));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue