Support import from application/autocrypt-setup type

This commit is contained in:
Vincent Breitmoser
2018-04-13 21:36:09 +02:00
parent 079305c375
commit 9bb19a3ad7
10 changed files with 59 additions and 12 deletions

View File

@@ -41,7 +41,7 @@ public class RequiredInputParcel implements Parcelable {
public enum RequiredInputType {
PASSPHRASE, PASSPHRASE_SYMMETRIC, PASSPHRASE_AUTH,
BACKUP_CODE, NUMERIC_9X4,
BACKUP_CODE, NUMERIC_9X4, NUMERIC_9X4_AUTOCRYPT,
SECURITY_TOKEN_SIGN, SECURITY_TOKEN_AUTH, SECURITY_TOKEN_DECRYPT,
SECURITY_TOKEN_MOVE_KEY_TO_CARD, SECURITY_TOKEN_RESET_CARD,
ENABLE_ORBOT, UPLOAD_FAIL_RETRY
@@ -193,6 +193,12 @@ public class RequiredInputParcel implements Parcelable {
inputData, null, null, (long[]) null, null);
}
public static RequiredInputParcel createRequiredNumeric9x4Autocrypt(String beginChars) {
byte[][] inputData = beginChars != null ? new byte[][] { beginChars.getBytes() } : null;
return new RequiredInputParcel(RequiredInputType.NUMERIC_9X4_AUTOCRYPT,
inputData, null, null, (long[]) null, null);
}
public static RequiredInputParcel createRequiredPassphrase(
RequiredInputParcel req) {
return new RequiredInputParcel(RequiredInputType.PASSPHRASE,