diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-04-26 23:23:48 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-04-26 23:23:48 +0200 |
commit | 9c3e910dc4c5605e0edad5ca876fff085f2150cb (patch) | |
tree | 5ad81d3bbcdb190071b45290e5ceddad343f7db6 /src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java | |
parent | 59652ecaf2d249d2e0046614fa0f3a3063b4b604 (diff) |
prevent user from accidentally changing password after using magic create
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java b/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java index 6b32bdc2..1b16e565 100644 --- a/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java @@ -8,6 +8,7 @@ import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; +import android.widget.Toast; import java.security.SecureRandom; @@ -60,12 +61,14 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher { account = new Account(jid, createPassword()); account.setOption(Account.OPTION_REGISTER, true); account.setOption(Account.OPTION_DISABLED, true); + account.setOption(Account.OPTION_MAGIC_CREATE, true); xmppConnectionService.createAccount(account); } Intent intent = new Intent(MagicCreateActivity.this, EditAccountActivity.class); intent.putExtra("jid", account.getJid().toBareJid().toString()); intent.putExtra("init", true); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); + Toast.makeText(MagicCreateActivity.this, R.string.secure_password_generated, Toast.LENGTH_SHORT).show(); startActivity(intent); } catch (InvalidJidException e) { mUsername.setError(getString(R.string.invalid_username)); |