From d46cfb757ea076428b19d3d0f00ecc75f9d03375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= Date: Mon, 28 Jun 2021 16:50:55 +0200 Subject: [PATCH] Do not allow the user to tap the start sharing button twice quickly --- .../briar/android/hotspot/HotspotIntroFragment.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/briar-android/src/main/java/org/briarproject/briar/android/hotspot/HotspotIntroFragment.java b/briar-android/src/main/java/org/briarproject/briar/android/hotspot/HotspotIntroFragment.java index b1b34fe5a..7979cb956 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/hotspot/HotspotIntroFragment.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/hotspot/HotspotIntroFragment.java @@ -84,8 +84,10 @@ public class HotspotIntroFragment extends Fragment { progressBar = v.findViewById(R.id.progressBar); progressTextView = v.findViewById(R.id.progressTextView); - startButton.setOnClickListener( - button -> conditionManager.startConditionChecks()); + startButton.setOnClickListener(button -> { + startButton.setEnabled(false); + conditionManager.startConditionChecks(); + }); return v; } @@ -97,6 +99,7 @@ public class HotspotIntroFragment extends Fragment { } private void startHotspot() { + startButton.setEnabled(true); if (conditionManager.checkAndRequestConditions()) { showInstallWarningIfNeeded(); beginDelayedTransition((ViewGroup) requireView());