From 0c224191a159162ffde232770848ff5805d4d522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Tue, 1 Mar 2016 00:21:28 +0100 Subject: Add EXTRA_REQUEST_ASCII_ARMOR to ACTION_BACKUP --- .../java/org/openintents/openpgp/example/OpenPgpApiActivity.java | 1 + .../src/main/java/org/openintents/openpgp/util/OpenPgpApi.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java b/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java index 992f8be..00a8f7d 100644 --- a/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java +++ b/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java @@ -413,6 +413,7 @@ public class OpenPgpApiActivity extends Activity { data.setAction(OpenPgpApi.ACTION_BACKUP); data.putExtra(OpenPgpApi.EXTRA_KEY_IDS, new long[]{Long.decode(mGetKeyEdit.getText().toString())}); data.putExtra(OpenPgpApi.EXTRA_BACKUP_SECRET, true); + data.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); ByteArrayOutputStream os = new ByteArrayOutputStream(); diff --git a/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java b/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java index 5417f6b..da594b6 100644 --- a/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java +++ b/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java @@ -211,8 +211,11 @@ public class OpenPgpApi { * This operation always requires user interaction with RESULT_CODE_USER_INTERACTION_REQUIRED! *

* required extras: - * long[] EXTRA_KEY_IDS (keys that should be included in the backup) - * boolean EXTRA_BACKUP_SECRET (also backup secret keys) + * long[] EXTRA_KEY_IDS (keys that should be included in the backup) + * boolean EXTRA_BACKUP_SECRET (also backup secret keys) + *

+ * optional extras: + * String EXTRA_REQUEST_ASCII_ARMOR (request that the returned backup is encoded in ASCII Armor) */ public static final String ACTION_BACKUP = "org.openintents.openpgp.action.BACKUP"; -- cgit v1.2.3