[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] ensure textview is not null for #379
commit d6b6d5cb8b3d7c3cc92e708a4b87fc34f4e008f8
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date: Thu Aug 20 08:57:20 2020 -0400
ensure textview is not null for #379
---
.../torproject/android/ui/onboarding/BridgeWizardActivity.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
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 f641c81d..86cd3544 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
@@ -207,8 +207,14 @@ public class BridgeWizardActivity extends AppCompatActivity {
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
- savedInstanceState.putInt(BUNDLE_KEY_TV_STATUS_VISIBILITY, mTvStatus.getVisibility());
- savedInstanceState.putString(BUNDLE_KEY_TV_STATUS_TEXT, mTvStatus.getText().toString());
+
+ if (mTvStatus != null) {
+ savedInstanceState.putInt(BUNDLE_KEY_TV_STATUS_VISIBILITY, mTvStatus.getVisibility());
+
+ if (!TextUtils.isEmpty(mTvStatus.getText()))
+ savedInstanceState.putString(BUNDLE_KEY_TV_STATUS_TEXT, mTvStatus.getText().toString());
+ }
+
super.onSaveInstanceState(savedInstanceState);
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits