Added ascii armor option to the backup api

This commit is contained in:
Hari
2017-01-29 22:14:54 +05:30
parent 146833916b
commit 28bf1a37a1
5 changed files with 19 additions and 16 deletions

View File

@@ -615,6 +615,7 @@ public class OpenPgpService extends Service {
try {
long[] masterKeyIds = data.getLongArrayExtra(OpenPgpApi.EXTRA_KEY_IDS);
boolean backupSecret = data.getBooleanExtra(OpenPgpApi.EXTRA_BACKUP_SECRET, false);
boolean enableAsciiArmorOutput = data.getBooleanExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true);
CryptoInputParcel inputParcel = CryptoInputParcelCacheService.getCryptoInputParcel(this, data);
if (inputParcel == null) {
@@ -626,7 +627,7 @@ public class OpenPgpService extends Service {
// after user interaction with RemoteBackupActivity,
// the backup code is cached in CryptoInputParcelCacheService, now we can proceed
BackupKeyringParcel input = new BackupKeyringParcel(masterKeyIds, backupSecret, true, null);
BackupKeyringParcel input = new BackupKeyringParcel(masterKeyIds, backupSecret, true, enableAsciiArmorOutput, null);
BackupOperation op = new BackupOperation(this, mProviderHelper, null);
ExportResult pgpResult = op.execute(input, inputParcel, outputStream);