[tor-commits] [orbot/master] don't create a new handler for restarting main activity
n8fr8 at torproject.org
n8fr8 at torproject.org
Mon Aug 24 21:02:52 UTC 2020
commit c9cb5bb33222a73a9545ab70b60109b245218d2b
Author: n8fr8 <nathan at guardianproject.info>
Date: Thu Aug 20 09:06:17 2020 -0400
don't create a new handler for restarting main activity
---
app/src/main/java/org/torproject/android/OrbotMainActivity.java | 3 +--
.../org/torproject/android/ui/onboarding/BridgeWizardActivity.java | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index c7ca1a7f..47f725ec 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -806,8 +806,7 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan
finish();
- final Handler handler = new Handler();
- handler.postDelayed(() -> {
+ mStatusUpdateHandler.postDelayed(() -> {
//Do something after 100ms
startActivity(new Intent(OrbotMainActivity.this, OrbotMainActivity.class));
diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
index 86cd3544..f0b06b2b 100644
--- a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
@@ -214,7 +214,7 @@ public class BridgeWizardActivity extends AppCompatActivity {
if (!TextUtils.isEmpty(mTvStatus.getText()))
savedInstanceState.putString(BUNDLE_KEY_TV_STATUS_TEXT, mTvStatus.getText().toString());
}
-
+
super.onSaveInstanceState(savedInstanceState);
}
More information about the tor-commits
mailing list