From 54e2e5e37297d075cd76f53fdf23ada63a7e8e88 Mon Sep 17 00:00:00 2001 From: arrase Date: Tue, 29 Nov 2016 21:04:41 +0100 Subject: [PATCH] fix for: https://github.com/n8fr8/orbot/issues/63 --- .../main/java/org/torproject/android/OrbotMainActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java index 7706c0f5..551fb6e7 100644 --- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java +++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java @@ -105,6 +105,7 @@ public class OrbotMainActivity extends AppCompatActivity /* Some tracking bits */ private String torStatus = TorServiceConstants.STATUS_OFF; //latest status reported from the tor service private Intent lastStatusIntent; // the last ACTION_STATUS Intent received + private Boolean isFirstRun = true; private SharedPreferences mPrefs = null; @@ -1301,8 +1302,9 @@ public class OrbotMainActivity extends AppCompatActivity String newTorStatus = msg.getData().getString("status"); String log = (String)msg.obj; - if (torStatus == null && newTorStatus != null) //first time status + if (isFirstRun && newTorStatus != null) //first time status { + isFirstRun = false; torStatus = newTorStatus; findViewById(R.id.frameMain).setVisibility(View.VISIBLE); updateStatus(log);