Add option to BackupOperation to export only secret keys

This commit is contained in:
Vincent Breitmoser
2018-04-16 17:37:29 +02:00
parent 347ab8fa15
commit 8ad2d56f1c
5 changed files with 26 additions and 13 deletions

View File

@@ -31,14 +31,20 @@ public abstract class BackupKeyringParcel implements Parcelable {
@SuppressWarnings("mutable")
public abstract long[] getMasterKeyIds();
public abstract boolean getExportSecret();
public abstract boolean getExportPublic();
public abstract boolean getIsEncrypted();
public abstract boolean getEnableAsciiArmorOutput();
@Nullable
public abstract Uri getOutputUri();
public static BackupKeyringParcel createBackupKeyringParcel(long[] masterKeyIds, boolean exportSecret,
public static BackupKeyringParcel create(long[] masterKeyIds, boolean exportSecret,
boolean isEncrypted, boolean enableAsciiArmorOutput, Uri outputUri) {
return new AutoValue_BackupKeyringParcel(
masterKeyIds, exportSecret, isEncrypted, enableAsciiArmorOutput, outputUri);
masterKeyIds, exportSecret, true, isEncrypted, enableAsciiArmorOutput, outputUri);
}
public static BackupKeyringParcel createExportAutocryptSetupMessage(long[] masterKeyIds) {
return new AutoValue_BackupKeyringParcel(
masterKeyIds, true, false, true, true, null);
}
}