diff --git a/src/org/thoughtcrime/securesms/PassphraseChangeActivity.java b/src/org/thoughtcrime/securesms/PassphraseChangeActivity.java index 548b6e84fd..eec279fda6 100644 --- a/src/org/thoughtcrime/securesms/PassphraseChangeActivity.java +++ b/src/org/thoughtcrime/securesms/PassphraseChangeActivity.java @@ -16,15 +16,16 @@ */ package org.thoughtcrime.securesms; -import android.content.Context; import android.os.AsyncTask; +import android.content.Context; +import android.util.Log; import android.os.Bundle; import android.text.Editable; -import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; +import android.widget.Toast; import org.thoughtcrime.securesms.crypto.InvalidPassphraseException; import org.thoughtcrime.securesms.crypto.MasterSecret; @@ -100,11 +101,15 @@ public class PassphraseChangeActivity extends PassphraseActivity { } if (!passphrase.equals(passphraseRepeat)) { + Toast.makeText(getApplicationContext(), + R.string.PassphraseChangeActivity_passphrases_dont_match_exclamation, + Toast.LENGTH_SHORT).show(); this.newPassphrase.setText(""); this.repeatPassphrase.setText(""); - this.newPassphrase.setError(getString(R.string.PassphraseChangeActivity_passphrases_dont_match_exclamation)); } else if (passphrase.equals("")) { - this.newPassphrase.setError(getString(R.string.PassphraseChangeActivity_enter_new_passphrase_exclamation)); + Toast.makeText(getApplicationContext(), + R.string.PassphraseChangeActivity_enter_new_passphrase_exclamation, + Toast.LENGTH_SHORT).show(); } else { new ChangePassphraseTask(this).execute(original, passphrase); } @@ -155,8 +160,9 @@ public class PassphraseChangeActivity extends PassphraseActivity { if (masterSecret != null) { setMasterSecret(masterSecret); } else { + Toast.makeText(context, R.string.PassphraseChangeActivity_incorrect_old_passphrase_exclamation, + Toast.LENGTH_LONG).show(); originalPassphrase.setText(""); - originalPassphrase.setError(getString(R.string.PassphraseChangeActivity_incorrect_old_passphrase_exclamation)); } } }