Move passphrase disabled preference set to after secret generation.

Fixes #2588
This commit is contained in:
Moxie Marlinspike 2015-03-05 13:09:18 -08:00
parent ac5306be5b
commit 301ed0b255

View File

@ -16,9 +16,7 @@
*/ */
package org.thoughtcrime.securesms; package org.thoughtcrime.securesms;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
@ -52,7 +50,6 @@ public class PassphraseCreateActivity extends PassphraseActivity {
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
getSupportActionBar().setCustomView(R.layout.light_centered_app_title); getSupportActionBar().setCustomView(R.layout.light_centered_app_title);
TextSecurePreferences.setPasswordDisabled(this, true);
new SecretGenerator().execute(MasterSecretUtil.UNENCRYPTED_PASSPHRASE); new SecretGenerator().execute(MasterSecretUtil.UNENCRYPTED_PASSPHRASE);
} }
@ -74,6 +71,7 @@ public class PassphraseCreateActivity extends PassphraseActivity {
MasterSecretUtil.generateAsymmetricMasterSecret(PassphraseCreateActivity.this, masterSecret); MasterSecretUtil.generateAsymmetricMasterSecret(PassphraseCreateActivity.this, masterSecret);
IdentityKeyUtil.generateIdentityKeys(PassphraseCreateActivity.this, masterSecret); IdentityKeyUtil.generateIdentityKeys(PassphraseCreateActivity.this, masterSecret);
VersionTracker.updateLastSeenVersion(PassphraseCreateActivity.this); VersionTracker.updateLastSeenVersion(PassphraseCreateActivity.this);
TextSecurePreferences.setPasswordDisabled(PassphraseCreateActivity.this, true);
return null; return null;
} }