[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] disable MOAT and Snowflake on SDK < 28 since they don't currently work



commit 816c5825098a7a5d98f600feae00e90117a6eca9
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Mon Dec 20 23:18:43 2021 -0500

    disable MOAT and Snowflake on SDK < 28 since they don't currently work
---
 .../android/ui/onboarding/BridgeWizardActivity.java        | 14 ++++++++++----
 app/src/main/res/layout/content_bridge_wizard.xml          |  3 ++-
 2 files changed, 12 insertions(+), 5 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 5dc4e770..c28515ed 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
@@ -43,10 +43,16 @@ public class BridgeWizardActivity extends AppCompatActivity {
         if (actionBar != null) {
             actionBar.setDisplayHomeAsUpEnabled(true);
         }
-
-        findViewById(R.id.btnMoat).setOnClickListener(v -> {
-            startActivityForResult(new Intent(BridgeWizardActivity.this, MoatActivity.class), MOAT_REQUEST_CODE);
-        });
+        if(android.os.Build.VERSION.SDK_INT < 28){
+            findViewById(R.id.btnMoat).setVisibility(View.GONE);
+            findViewById(R.id.btnBridgesSnowflake).setVisibility(View.GONE);
+            findViewById(R.id.btnSnowflakeAmp).setVisibility(View.GONE);
+        }
+        else {
+            findViewById(R.id.btnMoat).setOnClickListener(v -> {
+                startActivityForResult(new Intent(BridgeWizardActivity.this, MoatActivity.class), MOAT_REQUEST_CODE);
+            });
+        }
 
         mBtDirect = findViewById(R.id.btnBridgesDirect);
         mBtDirect.setOnCheckedChangeListener((buttonView, isChecked) -> {
diff --git a/app/src/main/res/layout/content_bridge_wizard.xml b/app/src/main/res/layout/content_bridge_wizard.xml
index 65364846..887e5ea4 100644
--- a/app/src/main/res/layout/content_bridge_wizard.xml
+++ b/app/src/main/res/layout/content_bridge_wizard.xml
@@ -30,7 +30,8 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_margin="12dp"
-            android:text="@string/request_bridges_from_torproject" />
+            android:text="@string/request_bridges_from_torproject"
+            />
 
         <RadioGroup
             android:layout_width="match_parent"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits