Add --voice / -v option for voice call verification

This commit is contained in:
Juraj Bednar 2015-07-05 19:54:03 +02:00 committed by AsamK
parent 9d71313a0c
commit 841519e27a
2 changed files with 12 additions and 4 deletions

View file

@ -117,12 +117,16 @@ public class Manager {
return registered;
}
public void register() throws IOException {
public void register(boolean voiceVerication) throws IOException {
password = Util.getSecret(18);
accountManager = new TextSecureAccountManager(URL, TRUST_STORE, username, password);
accountManager.requestSmsVerificationCode();
if (voiceVerication)
accountManager.requestVoiceVerificationCode();
else
accountManager.requestSmsVerificationCode();
registered = false;
}