From f2c5e904e89517460179d4663d18ce421b86fcd9 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Fri, 19 Feb 2016 23:27:31 +0000 Subject: [PATCH] Replace passphrase mismatch toast with error Display a form error instead of a toast if the passphrase doesn't match. Closes #5268 // FREEBIE --- src/org/thoughtcrime/securesms/PassphrasePromptActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/PassphrasePromptActivity.java b/src/org/thoughtcrime/securesms/PassphrasePromptActivity.java index e27400f80f..dc652309c9 100644 --- a/src/org/thoughtcrime/securesms/PassphrasePromptActivity.java +++ b/src/org/thoughtcrime/securesms/PassphrasePromptActivity.java @@ -35,7 +35,6 @@ import android.view.inputmethod.EditorInfo; import android.widget.EditText; import android.widget.ImageButton; import android.widget.TextView; -import android.widget.Toast; import org.thoughtcrime.securesms.components.AnimatingToggle; import org.thoughtcrime.securesms.crypto.InvalidPassphraseException; @@ -116,8 +115,8 @@ public class PassphrasePromptActivity extends PassphraseActivity { setMasterSecret(masterSecret); } catch (InvalidPassphraseException ipe) { passphraseText.setText(""); - Toast.makeText(this, R.string.PassphrasePromptActivity_invalid_passphrase_exclamation, - Toast.LENGTH_SHORT).show(); + passphraseText.setError( + getString(R.string.PassphrasePromptActivity_invalid_passphrase_exclamation)); } }