|
|
|
@ -16,18 +16,19 @@
|
|
|
|
|
*/
|
|
|
|
|
package org.thoughtcrime.securesms;
|
|
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.crypto.InvalidPassphraseException;
|
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
|
|
|
|
|
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
|
|
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.text.Editable;
|
|
|
|
|
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;
|
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
|
|
|
|
|
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Activity for changing a user's local encryption passphrase.
|
|
|
|
|
*
|
|
|
|
@ -63,9 +64,13 @@ public class PassphraseChangeActivity extends PassphraseActivity {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void verifyAndSavePassphrases() {
|
|
|
|
|
String original = this.originalPassphrase.getText().toString();
|
|
|
|
|
String passphrase = this.newPassphrase.getText().toString();
|
|
|
|
|
String passphraseRepeat = this.repeatPassphrase.getText().toString();
|
|
|
|
|
Editable originalText = this.originalPassphrase.getText();
|
|
|
|
|
Editable newText = this.newPassphrase.getText();
|
|
|
|
|
Editable repeatText = this.repeatPassphrase.getText();
|
|
|
|
|
|
|
|
|
|
String original = (originalText == null ? "" : originalText.toString());
|
|
|
|
|
String passphrase = (newText == null ? "" : newText.toString());
|
|
|
|
|
String passphraseRepeat = (repeatText == null ? "" : repeatText.toString());
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if (!passphrase.equals(passphraseRepeat)) {
|
|
|
|
|