[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] small bug where 'snowflake' can appear in a field to paste custom bridge config
commit 5bf2ba8941740b836d38eb801259d23c014096dd
Author: bim <dsnake@xxxxxxxxxxxxxx>
Date: Wed Feb 3 10:43:02 2021 -0500
small bug where 'snowflake' can appear in a field to paste custom bridge config
---
.../torproject/android/ui/onboarding/CustomBridgesActivity.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java
index f34a49cc..6d7817df 100644
--- a/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/onboarding/CustomBridgesActivity.java
@@ -80,7 +80,7 @@ public class CustomBridgesActivity extends AppCompatActivity implements View.OnC
findViewById(R.id.btCopyUrl).setOnClickListener(this);
String bridges = Prefs.getBridgesList().trim();
- if (!Prefs.bridgesEnabled() || bridges.equals("obfs4") || bridges.equals("meek")) {
+ if (!Prefs.bridgesEnabled() || userHasSetPreconfiguredBridge(bridges)) {
bridges = null;
}
@@ -90,9 +90,7 @@ public class CustomBridgesActivity extends AppCompatActivity implements View.OnC
mEtPastedBridges.addTextChangedListener(this);
findViewById(R.id.btScanQr).setOnClickListener(this);
-
findViewById(R.id.btShareQr).setOnClickListener(this);
-
findViewById(R.id.btEmail).setOnClickListener(this);
}
@@ -224,4 +222,9 @@ public class CustomBridgesActivity extends AppCompatActivity implements View.OnC
intent.setAction(TorServiceConstants.CMD_SIGNAL_HUP);
startService(intent);
}
+
+ private static boolean userHasSetPreconfiguredBridge(String bridges) {
+ if (bridges == null) return false;
+ return bridges.equals("obfs4") || bridges.equals("meek") || bridges.equals("snowflake");
+ }
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits