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

[tor-commits] [orbot/master] Fixes #354 MOAT Solution Textfield is only enabled when there's a solution. Also do not automatically open up the keyboard when there's nothing to type.



commit d521ae02d585b8554cb8dc75984209564fa51533
Author: bim <dsnake@xxxxxxxxxxxxxx>
Date:   Tue Jun 16 12:40:24 2020 -0400

    Fixes #354 MOAT Solution Textfield is only enabled when there's a solution. Also do not automatically open up the keyboard when there's nothing to type.
---
 app/src/main/AndroidManifest.xml                            | 13 +++++--------
 .../org/torproject/android/ui/onboarding/MoatActivity.java  |  1 +
 app/src/main/res/layout/activity_moat.xml                   |  1 +
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index da126ea9..3ac50847 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -73,11 +73,6 @@
             android:stateNotNeeded="true"
             android:theme="@android:style/Theme.Translucent" />
 
-        <activity
-            android:name=".ui.VPNEnableActivity"
-            android:exported="false"
-            android:label="@string/app_name" />
-
         <activity
             android:name=".settings.SettingsPreferences"
             android:label="@string/app_name" />
@@ -107,7 +102,9 @@
 
         <activity android:name=".ui.onboarding.OnboardingActivity" />
         <activity android:name=".ui.onboarding.BridgeWizardActivity" />
-        <activity android:name=".ui.onboarding.MoatActivity" />
+        <activity
+            android:name=".ui.onboarding.MoatActivity"
+            android:windowSoftInputMode="stateHidden" />
         <activity android:name=".ui.onboarding.CustomBridgesActivity" />
 
         <provider
@@ -164,12 +161,12 @@
             android:name=".service.OrbotService"
             android:enabled="true"
             android:permission="android.permission.BIND_VPN_SERVICE"
-            android:stopWithTask="false" >
+            android:stopWithTask="false">
             <intent-filter>
                 <action android:name="android.net.VpnService" />
             </intent-filter>
         </service>
-        
+
     </application>
 
 </manifest>
\ No newline at end of file
diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java
index 8a47fc9b..69e9e9e2 100644
--- a/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java
@@ -135,6 +135,7 @@ public class MoatActivity extends AppCompatActivity implements View.OnClickListe
                 mProgressBar.setVisibility(View.GONE);
                 mIvCaptcha.setImageBitmap(BitmapFactory.decodeByteArray(mCaptcha, 0, mCaptcha.length));
                 mRequestInProgress = false;
+                mEtSolution.setEnabled(true);
             }
         }
         else {
diff --git a/app/src/main/res/layout/activity_moat.xml b/app/src/main/res/layout/activity_moat.xml
index c9d68d12..ba052dbd 100644
--- a/app/src/main/res/layout/activity_moat.xml
+++ b/app/src/main/res/layout/activity_moat.xml
@@ -65,6 +65,7 @@
                 android:layout_height="wrap_content"
                 android:autofillHints=""
                 android:ems="10"
+                android:enabled="false"
                 android:hint="@string/enter_characters_from_image"
                 android:imeOptions="actionSend"
                 android:inputType="textShortMessage|text"



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