Merge branch 'fix_bug_63' of https://github.com/arrase/orbot into arrase-fix_bug_63
Conflicts: app/src/main/java/org/torproject/android/OrbotMainActivity.java
This commit is contained in:
commit
cb2c5fe661
|
@ -114,7 +114,7 @@ public class OrbotMainActivity extends AppCompatActivity
|
||||||
private ActionBarDrawerToggle mDrawerToggle;
|
private ActionBarDrawerToggle mDrawerToggle;
|
||||||
|
|
||||||
/* Some tracking bits */
|
/* Some tracking bits */
|
||||||
private String torStatus = TorServiceConstants.STATUS_OFF; //latest status reported from the tor service
|
private String torStatus = null; //latest status reported from the tor service
|
||||||
private Intent lastStatusIntent; // the last ACTION_STATUS Intent received
|
private Intent lastStatusIntent; // the last ACTION_STATUS Intent received
|
||||||
|
|
||||||
private SharedPreferences mPrefs = null;
|
private SharedPreferences mPrefs = null;
|
||||||
|
@ -1288,8 +1288,17 @@ public class OrbotMainActivity extends AppCompatActivity
|
||||||
{
|
{
|
||||||
autoStartFromIntent = false;
|
autoStartFromIntent = false;
|
||||||
Intent resultIntent = lastStatusIntent;
|
Intent resultIntent = lastStatusIntent;
|
||||||
resultIntent.putExtra(TorServiceConstants.EXTRA_STATUS, torStatus);
|
|
||||||
|
if (resultIntent == null)
|
||||||
|
resultIntent = new Intent(TorServiceConstants.ACTION_START);
|
||||||
|
|
||||||
|
resultIntent.putExtra(
|
||||||
|
TorServiceConstants.EXTRA_STATUS,
|
||||||
|
torStatus == null?TorServiceConstants.STATUS_OFF:torStatus
|
||||||
|
);
|
||||||
|
|
||||||
setResult(RESULT_OK, resultIntent);
|
setResult(RESULT_OK, resultIntent);
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
Log.d(TAG, "autoStartFromIntent finish");
|
Log.d(TAG, "autoStartFromIntent finish");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue