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;
|
||||
|
||||
/* 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 SharedPreferences mPrefs = null;
|
||||
|
@ -1288,8 +1288,17 @@ public class OrbotMainActivity extends AppCompatActivity
|
|||
{
|
||||
autoStartFromIntent = false;
|
||||
Intent resultIntent = lastStatusIntent;
|
||||
resultIntent.putExtra(TorServiceConstants.EXTRA_STATUS, torStatus);
|
||||
setResult(RESULT_OK, resultIntent);
|
||||
|
||||
if (resultIntent == null)
|
||||
resultIntent = new Intent(TorServiceConstants.ACTION_START);
|
||||
|
||||
resultIntent.putExtra(
|
||||
TorServiceConstants.EXTRA_STATUS,
|
||||
torStatus == null?TorServiceConstants.STATUS_OFF:torStatus
|
||||
);
|
||||
|
||||
setResult(RESULT_OK, resultIntent);
|
||||
|
||||
finish();
|
||||
Log.d(TAG, "autoStartFromIntent finish");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue