aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-08-10 21:52:09 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-08-10 21:52:09 +0200
commit306b94b07e0276f23737db439ba085946a9d4f5d (patch)
treedd089b45f5831c579c2543b2aa230f682287ca9f
parenta3dc54da68b3de64496457336237ae75e0b4630f (diff)
parentb42636ec3ec63bef61af264a0a9b09998db8186b (diff)
downloadopenpgp-api-306b94b07e0276f23737db439ba085946a9d4f5d.tar.gz
openpgp-api-306b94b07e0276f23737db439ba085946a9d4f5d.tar.bz2
openpgp-api-306b94b07e0276f23737db439ba085946a9d4f5d.zip
Merge branch 'master' of github.com:open-keychain/openpgp-api
-rw-r--r--.tx/config4
-rw-r--r--openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.java108
-rw-r--r--openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpError.java6
-rw-r--r--openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpMetadata.java6
-rw-r--r--openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.java60
-rw-r--r--openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java28
-rw-r--r--openpgp-api/src/main/res/values-ar/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-bg/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-de/strings.xml4
-rw-r--r--openpgp-api/src/main/res/values-es/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-eu/strings.xml7
-rw-r--r--openpgp-api/src/main/res/values-fr/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-ja/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-nl/strings.xml7
-rw-r--r--openpgp-api/src/main/res/values-pl/strings.xml5
-rw-r--r--openpgp-api/src/main/res/values-ro/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-ru/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-sl/strings.xml2
-rw-r--r--openpgp-api/src/main/res/values-sr/strings.xml7
-rw-r--r--openpgp-api/src/main/res/values-sv/strings.xml5
-rw-r--r--openpgp-api/src/main/res/values-tr/strings.xml5
-rw-r--r--openpgp-api/src/main/res/values-zh-rTW/strings.xml4
-rw-r--r--openpgp-api/src/main/res/values-zh/strings.xml5
23 files changed, 219 insertions, 58 deletions
diff --git a/.tx/config b/.tx/config
index 9e6de61..ab194a8 100644
--- a/.tx/config
+++ b/.tx/config
@@ -3,6 +3,6 @@ host = https://www.transifex.com
lang_map = af_ZA: af-rZA, am_ET: am-rET, ar_AE: ar-rAE, ar_BH: ar-rBH, ar_DZ: ar-rDZ, ar_EG: ar-rEG, ar_IQ: ar-rIQ, ar_JO: ar-rJO, ar_KW: ar-rKW, ar_LB: ar-rLB, ar_LY: ar-rLY, ar_MA: ar-rMA, ar_OM: ar-rOM, ar_QA: ar-rQA, ar_SA: ar-rSA, ar_SY: ar-rSY, ar_TN: ar-rTN, ar_YE: ar-rYE, arn_CL: arn-rCL, as_IN: as-rIN, az_AZ: az-rAZ, ba_RU: ba-rRU, be_BY: be-rBY, bg_BG: bg-rBG, bn_BD: bn-rBD, bn_IN: bn-rIN, bo_CN: bo-rCN, br_FR: br-rFR, bs_BA: bs-rBA, ca_ES: ca-rES, co_FR: co-rFR, cs_CZ: cs-rCZ, cy_GB: cy-rGB, da_DK: da-rDK, de_AT: de-rAT, de_CH: de-rCH, de_DE: de-rDE, de_LI: de-rLI, de_LU: de-rLU, dsb_DE: dsb-rDE, dv_MV: dv-rMV, el_GR: el-rGR, en_AU: en-rAU, en_BZ: en-rBZ, en_CA: en-rCA, en_GB: en-rGB, en_IE: en-rIE, en_IN: en-rIN, en_JM: en-rJM, en_MY: en-rMY, en_NZ: en-rNZ, en_PH: en-rPH, en_SG: en-rSG, en_TT: en-rTT, en_US: en-rUS, en_ZA: en-rZA, en_ZW: en-rZW, es_AR: es-rAR, es_BO: es-rBO, es_CL: es-rCL, es_CO: es-rCO, es_CR: es-rCR, es_DO: es-rDO, es_EC: es-rEC, es_ES: es-rES, es_GT: es-rGT, es_HN: es-rHN, es_MX: es-rMX, es_NI: es-rNI, es_PA: es-rPA, es_PE: es-rPE, es_PR: es-rPR, es_PY: es-rPY, es_SV: es-rSV, es_US: es-rUS, es_UY: es-rUY, es_VE: es-rVE, et_EE: et-rEE, eu_ES: eu-rES, fa_IR: fa-rIR, fi_FI: fi-rFI, fil_PH: fil-rPH, fo_FO: fo-rFO, fr_BE: fr-rBE, fr_CA: fr-rCA, fr_CH: fr-rCH, fr_FR: fr-rFR, fr_LU: fr-rLU, fr_MC: fr-rMC, fy_NL: fy-rNL, ga_IE: ga-rIE, gd_GB: gd-rGB, gl_ES: gl-rES, gsw_FR: gsw-rFR, gu_IN: gu-rIN, ha_NG: ha-rNG, hi_IN: hi-rIN, hr_BA: hr-rBA, hr_HR: hr-rHR, hsb_DE: hsb-rDE, hu_HU: hu-rHU, hy_AM: hy-rAM, id_ID: id-rID, ig_NG: ig-rNG, ii_CN: ii-rCN, is_IS: is-rIS, it_CH: it-rCH, it_IT: it-rIT, iu_CA: iu-rCA, ja_JP: ja-rJP, ka_GE: ka-rGE, kk_KZ: kk-rKZ, kl_GL: kl-rGL, km_KH: km-rKH, kn_IN: kn-rIN, ko_KR: ko-rKR, kok_IN: kok-rIN, ky_KG: ky-rKG, lb_LU: lb-rLU, lo_LA: lo-rLA, lt_LT: lt-rLT, lv_LV: lv-rLV, mi_NZ: mi-rNZ, mk_MK: mk-rMK, ml_IN: ml-rIN, mn_CN: mn-rCN, mn_MN: mn-rMN, moh_CA: moh-rCA, mr_IN: mr-rIN, ms_BN: ms-rBN, ms_MY: ms-rMY, mt_MT: mt-rMT, nb_NO: nb-rNO, ne_NP: ne-rNP, nl_BE: nl-rBE, nl_NL: nl-rNL, nn_NO: nn-rNO, nso_ZA: nso-rZA, oc_FR: oc-rFR, or_IN: or-rIN, pa_IN: pa-rIN, pl_PL: pl-rPL, prs_AF: prs-rAF, ps_AF: ps-rAF, pt_BR: pt-rBR, pt_PT: pt-rPT, qut_GT: qut-rGT, quz_BO: quz-rBO, quz_EC: quz-rEC, quz_PE: quz-rPE, rm_CH: rm-rCH, ro_RO: ro-rRO, ru_RU: ru-rRU, rw_RW: rw-rRW, sa_IN: sa-rIN, sah_RU: sah-rRU, se_FI: se-rFI, se_NO: se-rNO, se_SE: se-rSE, si_LK: si-rLK, sk_SK: sk-rSK, sl_SI: sl-rSI, sma_NO: sma-rNO, sma_SE: sma-rSE, smj_NO: smj-rNO, smj_SE: smj-rSE, smn_FI: smn-rFI, sms_FI: sms-rFI, sq_AL: sq-rAL, sr_BA: sr-rBA, sr_CS: sr-rCS, sr_ME: sr-rME, sr_RS: sr-rRS, sv_FI: sv-rFI, sv_SE: sv-rSE, sw_KE: sw-rKE, syr_SY: syr-rSY, ta_IN: ta-rIN, te_IN: te-rIN, tg_TJ: tg-rTJ, th_TH: th-rTH, tk_TM: tk-rTM, tn_ZA: tn-rZA, tr_TR: tr-rTR, tt_RU: tt-rRU, tzm_DZ: tzm-rDZ, ug_CN: ug-rCN, uk_UA: uk-rUA, ur_PK: ur-rPK, uz_UZ: uz-rUZ, vi_VN: vi-rVN, wo_SN: wo-rSN, xh_ZA: xh-rZA, yo_NG: yo-rNG, zh_CN: zh-rCN, zh_HK: zh-rHK, zh_MO: zh-rMO, zh_SG: zh-rSG, zh_TW: zh-rTW, zu_ZA: zu-rZA, no_NO: no-rNO, he_IL: iw-rIL, he: iw
[open-keychain.api-strings]
-file_filter = res/values-<lang>/strings.xml
-source_file = res/values/strings.xml
+file_filter = openpgp-api/src/main/res/values-<lang>/strings.xml
+source_file = openpgp-api/src/main/res/values/strings.xml
source_lang = en
diff --git a/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.java b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.java
new file mode 100644
index 0000000..2090b55
--- /dev/null
+++ b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpDecryptionResult.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2015 Dominik Schürmann <dominik@dominikschuermann.de>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class OpenPgpDecryptionResult implements Parcelable {
+ /**
+ * Since there might be a case where new versions of the client using the library getting
+ * old versions of the protocol (and thus old versions of this class), we need a versioning
+ * system for the parcels sent between the clients and the providers.
+ */
+ public static final int PARCELABLE_VERSION = 1;
+
+ // content not encrypted
+ public static final int RESULT_NOT_ENCRYPTED = -1;
+ // insecure!
+ public static final int RESULT_INSECURE = 0;
+ // encrypted
+ public static final int RESULT_ENCRYPTED = 1;
+
+ int result;
+
+ public int getResult() {
+ return result;
+ }
+
+ public void setResult(int result) {
+ this.result = result;
+ }
+
+ public OpenPgpDecryptionResult() {
+
+ }
+
+ public OpenPgpDecryptionResult(int result) {
+ this.result = result;
+ }
+
+ public OpenPgpDecryptionResult(OpenPgpDecryptionResult b) {
+ this.result = b.result;
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel dest, int flags) {
+ /**
+ * NOTE: When adding fields in the process of updating this API, make sure to bump
+ * {@link #PARCELABLE_VERSION}.
+ */
+ dest.writeInt(PARCELABLE_VERSION);
+ // Inject a placeholder that will store the parcel size from this point on
+ // (not including the size itself).
+ int sizePosition = dest.dataPosition();
+ dest.writeInt(0);
+ int startPosition = dest.dataPosition();
+ // version 1
+ dest.writeInt(result);
+ // Go back and write the size
+ int parcelableSize = dest.dataPosition() - startPosition;
+ dest.setDataPosition(sizePosition);
+ dest.writeInt(parcelableSize);
+ dest.setDataPosition(startPosition + parcelableSize);
+ }
+
+ public static final Creator<OpenPgpDecryptionResult> CREATOR = new Creator<OpenPgpDecryptionResult>() {
+ public OpenPgpDecryptionResult createFromParcel(final Parcel source) {
+ source.readInt(); // parcelableVersion
+ int parcelableSize = source.readInt();
+ int startPosition = source.dataPosition();
+
+ OpenPgpDecryptionResult vr = new OpenPgpDecryptionResult();
+ vr.result = source.readInt();
+
+ // skip over all fields added in future versions of this parcel
+ source.setDataPosition(startPosition + parcelableSize);
+
+ return vr;
+ }
+
+ public OpenPgpDecryptionResult[] newArray(final int size) {
+ return new OpenPgpDecryptionResult[size];
+ }
+ };
+
+ @Override
+ public String toString() {
+ return "\nresult: " + result;
+ }
+
+}
diff --git a/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpError.java b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpError.java
index ce8f21f..69c39fd 100644
--- a/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpError.java
+++ b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpError.java
@@ -19,10 +19,6 @@ package org.openintents.openpgp;
import android.os.Parcel;
import android.os.Parcelable;
-/**
- * Parcelable versioning has been copied from Dashclock Widget
- * https://code.google.com/p/dashclock/source/browse/api/src/main/java/com/google/android/apps/dashclock/api/ExtensionData.java
- */
public class OpenPgpError implements Parcelable {
/**
* Since there might be a case where new versions of the client using the library getting
@@ -97,7 +93,7 @@ public class OpenPgpError implements Parcelable {
public static final Creator<OpenPgpError> CREATOR = new Creator<OpenPgpError>() {
public OpenPgpError createFromParcel(final Parcel source) {
- int parcelableVersion = source.readInt();
+ source.readInt(); // parcelableVersion
int parcelableSize = source.readInt();
int startPosition = source.dataPosition();
diff --git a/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpMetadata.java b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpMetadata.java
index d620a57..8b3a3bb 100644
--- a/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpMetadata.java
+++ b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpMetadata.java
@@ -19,10 +19,6 @@ package org.openintents.openpgp;
import android.os.Parcel;
import android.os.Parcelable;
-/**
- * Parcelable versioning has been copied from Dashclock Widget
- * https://code.google.com/p/dashclock/source/browse/api/src/main/java/com/google/android/apps/dashclock/api/ExtensionData.java
- */
public class OpenPgpMetadata implements Parcelable {
/**
* Since there might be a case where new versions of the client using the library getting
@@ -99,7 +95,7 @@ public class OpenPgpMetadata implements Parcelable {
public static final Creator<OpenPgpMetadata> CREATOR = new Creator<OpenPgpMetadata>() {
public OpenPgpMetadata createFromParcel(final Parcel source) {
- int parcelableVersion = source.readInt();
+ source.readInt(); // parcelableVersion
int parcelableSize = source.readInt();
int startPosition = source.dataPosition();
diff --git a/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.java b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.java
index 6b5045d..f188968 100644
--- a/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.java
+++ b/openpgp-api/src/main/java/org/openintents/openpgp/OpenPgpSignatureResult.java
@@ -23,10 +23,6 @@ import org.openintents.openpgp.util.OpenPgpUtils;
import java.util.ArrayList;
-/**
- * Parcelable versioning has been copied from Dashclock Widget
- * https://code.google.com/p/dashclock/source/browse/api/src/main/java/com/google/android/apps/dashclock/api/ExtensionData.java
- */
public class OpenPgpSignatureResult implements Parcelable {
/**
* Since there might be a case where new versions of the client using the library getting
@@ -35,37 +31,47 @@ public class OpenPgpSignatureResult implements Parcelable {
*/
public static final int PARCELABLE_VERSION = 2;
- // generic error on signature verification
- public static final int SIGNATURE_ERROR = 0;
- // successfully verified signature, with certified key
- public static final int SIGNATURE_SUCCESS_CERTIFIED = 1;
+ // content not signed
+ public static final int RESULT_NO_SIGNATURE = -1;
+ // invalid signature!
+ public static final int RESULT_INVALID_SIGNATURE = 0;
+ // successfully verified signature, with confirmed key
+ public static final int RESULT_VALID_CONFIRMED = 1;
// no key was found for this signature verification
- public static final int SIGNATURE_KEY_MISSING = 2;
- // successfully verified signature, but with uncertified key
- public static final int SIGNATURE_SUCCESS_UNCERTIFIED = 3;
- // key has been revoked
- public static final int SIGNATURE_KEY_REVOKED = 4;
- // key is expired
- public static final int SIGNATURE_KEY_EXPIRED = 5;
-
- int status;
+ public static final int RESULT_KEY_MISSING = 2;
+ // successfully verified signature, but with unconfirmed key
+ public static final int RESULT_VALID_UNCONFIRMED = 3;
+ // key has been revoked -> invalid signature!
+ public static final int RESULT_INVALID_KEY_REVOKED = 4;
+ // key is expired -> invalid signature!
+ public static final int RESULT_INVALID_KEY_EXPIRED = 5;
+ // insecure cryptographic algorithms/protocol -> invalid signature!
+ public static final int RESULT_INVALID_INSECURE = 6;
+
+ int result;
boolean signatureOnly;
String primaryUserId;
ArrayList<String> userIds;
long keyId;
- public int getStatus() {
- return status;
+ public int getResult() {
+ return result;
}
- public void setStatus(int status) {
- this.status = status;
+ public void setResult(int result) {
+ this.result = result;
}
+ /**
+ * @deprecated
+ */
public boolean isSignatureOnly() {
return signatureOnly;
}
+ /**
+ * @deprecated
+ */
public void setSignatureOnly(boolean signatureOnly) {
this.signatureOnly = signatureOnly;
}
@@ -100,7 +106,7 @@ public class OpenPgpSignatureResult implements Parcelable {
public OpenPgpSignatureResult(int signatureStatus, String signatureUserId,
boolean signatureOnly, long keyId, ArrayList<String> userIds) {
- this.status = signatureStatus;
+ this.result = signatureStatus;
this.signatureOnly = signatureOnly;
this.primaryUserId = signatureUserId;
this.keyId = keyId;
@@ -108,7 +114,7 @@ public class OpenPgpSignatureResult implements Parcelable {
}
public OpenPgpSignatureResult(OpenPgpSignatureResult b) {
- this.status = b.status;
+ this.result = b.result;
this.primaryUserId = b.primaryUserId;
this.signatureOnly = b.signatureOnly;
this.keyId = b.keyId;
@@ -131,7 +137,7 @@ public class OpenPgpSignatureResult implements Parcelable {
dest.writeInt(0);
int startPosition = dest.dataPosition();
// version 1
- dest.writeInt(status);
+ dest.writeInt(result);
dest.writeByte((byte) (signatureOnly ? 1 : 0));
dest.writeString(primaryUserId);
dest.writeLong(keyId);
@@ -146,12 +152,12 @@ public class OpenPgpSignatureResult implements Parcelable {
public static final Creator<OpenPgpSignatureResult> CREATOR = new Creator<OpenPgpSignatureResult>() {
public OpenPgpSignatureResult createFromParcel(final Parcel source) {
- int parcelableVersion = source.readInt();
+ source.readInt(); // parcelableVersion
int parcelableSize = source.readInt();
int startPosition = source.dataPosition();
OpenPgpSignatureResult vr = new OpenPgpSignatureResult();
- vr.status = source.readInt();
+ vr.result = source.readInt();
vr.signatureOnly = source.readByte() == 1;
vr.primaryUserId = source.readString();
vr.keyId = source.readLong();
@@ -171,7 +177,7 @@ public class OpenPgpSignatureResult implements Parcelable {
@Override
public String toString() {
- String out = "\nstatus: " + status;
+ String out = "\nresult: " + result;
out += "\nprimaryUserId: " + primaryUserId;
out += "\nuserIds: " + userIds;
out += "\nsignatureOnly: " + signatureOnly;
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 cd1edc5..39e71ce 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
@@ -49,7 +49,7 @@ public class OpenPgpApi {
* - Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, EXTRA_ORIGINAL_FILENAME, and OpenPgpMetadata parcel
* - Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
* 5:
- * - OpenPgpSignatureResult: new consts SIGNATURE_KEY_REVOKED and SIGNATURE_KEY_EXPIRED
+ * - OpenPgpSignatureResult: new consts RESULT_INVALID_KEY_REVOKED and RESULT_INVALID_KEY_EXPIRED
* - OpenPgpSignatureResult: ArrayList<String> userIds
* 6:
* - Deprecate ACTION_SIGN
@@ -65,8 +65,17 @@ public class OpenPgpApi {
* - New result for ACTION_DECRYPT_VERIFY: RESULT_TYPE
* - New ACTION_GET_SIGN_KEY_ID
* - EXTRA_PASSPHRASE changed from String to char[]
+ * 8:
+ * - OpenPgpSignatureResult:
+ * method getStatus() renamed to getResult()
+ * constants have been renamed for clarity
+ * new constants: RESULT_NO_SIGNATURE, RESULT_INVALID_INSECURE
+ * isSignatureOnly() has been deprecated
+ * - RESULT_TYPES have been removed
+ * - new OpenPgpDecryptionResult returned via RESULT_DECRYPTION
+ * - OpenPgpSignatureResult and OpenPgpDecryptionResult are never null, they are always returned.
*/
- public static final int API_VERSION = 7;
+ public static final int API_VERSION = 8;
/**
* General extras
@@ -161,7 +170,7 @@ public class OpenPgpApi {
* and also signed-only input.
* OutputStream is optional, e.g., for verifying detached signatures!
* <p/>
- * If OpenPgpSignatureResult.getStatus() == OpenPgpSignatureResult.SIGNATURE_KEY_MISSING
+ * If OpenPgpSignatureResult.getResult() == OpenPgpSignatureResult.RESULT_KEY_MISSING
* in addition a PendingIntent is returned via RESULT_INTENT to download missing keys.
* On all other status, in addition a PendingIntent is returned via RESULT_INTENT to open
* the key view in OpenKeychain.
@@ -171,9 +180,9 @@ public class OpenPgpApi {
* <p/>
* returned extras:
* OpenPgpSignatureResult RESULT_SIGNATURE
+ * OpenPgpDecryptionResult RESULT_DECRYPTION
* OpenPgpDecryptMetadata RESULT_METADATA
* String RESULT_CHARSET (charset which was specified in the headers of ascii armored input, if any)
- * int RESULT_TYPE
*/
public static final String ACTION_DECRYPT_VERIFY = "org.openintents.openpgp.action.DECRYPT_VERIFY";
@@ -270,15 +279,11 @@ public class OpenPgpApi {
// DECRYPT_VERIFY
public static final String EXTRA_DETACHED_SIGNATURE = "detached_signature";
public static final String RESULT_SIGNATURE = "signature";
+ public static final String RESULT_DECRYPTION = "decryption";
public static final String RESULT_METADATA = "metadata";
// This will be the charset which was specified in the headers of ascii armored input, if any
public static final String RESULT_CHARSET = "charset";
- public static final String RESULT_TYPE = "type";
- public static final int RESULT_TYPE_UNENCRYPTED_UNSIGNED = 0;
- public static final int RESULT_TYPE_ENCRYPTED = 1;
- public static final int RESULT_TYPE_SIGNED = 2;
-
// INTERNAL, should not be used
public static final String EXTRA_CALL_UUID1 = "call_uuid1";
public static final String EXTRA_CALL_UUID2 = "call_uuid2";
@@ -334,11 +339,6 @@ public class OpenPgpApi {
/**
* InputStream and OutputStreams are always closed after operating on them!
- *
- * @param data
- * @param is
- * @param os
- * @return
*/
public Intent executeApi(Intent data, InputStream is, OutputStream os) {
ParcelFileDescriptor input = null;
diff --git a/openpgp-api/src/main/res/values-ar/strings.xml b/openpgp-api/src/main/res/values-ar/strings.xml
new file mode 100644
index 0000000..c757504
--- /dev/null
+++ b/openpgp-api/src/main/res/values-ar/strings.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>
diff --git a/openpgp-api/src/main/res/values-bg/strings.xml b/openpgp-api/src/main/res/values-bg/strings.xml
new file mode 100644
index 0000000..c757504
--- /dev/null
+++ b/openpgp-api/src/main/res/values-bg/strings.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>
diff --git a/openpgp-api/src/main/res/values-de/strings.xml b/openpgp-api/src/main/res/values-de/strings.xml
index 91e800a..01574ed 100644
--- a/openpgp-api/src/main/res/values-de/strings.xml
+++ b/openpgp-api/src/main/res/values-de/strings.xml
@@ -1,5 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="openpgp_list_preference_none">Keine Auswahl</string>
- <string name="openpgp_install_openkeychain_via">Installiere OpenKeychain mit %s</string>
+ <string name="openpgp_install_openkeychain_via">Installiere OpenKeychain über %s</string>
+ <string name="openpgp_no_key_selected">Kein Schlüssel ausgewählt</string>
+ <string name="openpgp_key_selected">Schlüssel wurde ausgewählt</string>
</resources>
diff --git a/openpgp-api/src/main/res/values-es/strings.xml b/openpgp-api/src/main/res/values-es/strings.xml
index da8979b..b83a6ca 100644
--- a/openpgp-api/src/main/res/values-es/strings.xml
+++ b/openpgp-api/src/main/res/values-es/strings.xml
@@ -2,4 +2,6 @@
<resources>
<string name="openpgp_list_preference_none">Ninguno</string>
<string name="openpgp_install_openkeychain_via">Instalar OpenKeychain mediante %s</string>
+ <string name="openpgp_no_key_selected">No se seleccionó clave</string>
+ <string name="openpgp_key_selected">Se ha seleccionado clave</string>
</resources>
diff --git a/openpgp-api/src/main/res/values-eu/strings.xml b/openpgp-api/src/main/res/values-eu/strings.xml
new file mode 100644
index 0000000..b143f9f
--- /dev/null
+++ b/openpgp-api/src/main/res/values-eu/strings.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+ <string name="openpgp_list_preference_none">Ezer ez</string>
+ <string name="openpgp_install_openkeychain_via">Ezarri OpenKeychain %s bidez</string>
+ <string name="openpgp_no_key_selected">Ez da giltzarik hautatu</string>
+ <string name="openpgp_key_selected">Giltza hautatu da</string>
+</resources>
diff --git a/openpgp-api/src/main/res/values-fr/strings.xml b/openpgp-api/src/main/res/values-fr/strings.xml
index 9b36df2..4792138 100644
--- a/openpgp-api/src/main/res/values-fr/strings.xml
+++ b/openpgp-api/src/main/res/values-fr/strings.xml
@@ -2,4 +2,6 @@
<resources>
<string name="openpgp_list_preference_none">Aucun</string>
<string name="openpgp_install_openkeychain_via">Installer OpenKeychain par %s</string>
+ <string name="openpgp_no_key_selected">Aucune clef sélectionnée</string>
+ <string name="openpgp_key_selected">La clef a été sélectionnée</string>
</resources>
diff --git a/openpgp-api/src/main/res/values-ja/strings.xml b/openpgp-api/src/main/res/values-ja/strings.xml
index 5e337f5..ab9ba21 100644
--- a/openpgp-api/src/main/res/values-ja/strings.xml
+++ b/openpgp-api/src/main/res/values-ja/strings.xml
@@ -2,4 +2,6 @@
<resources>
<string name="openpgp_list_preference_none">無し</string>
<string name="openpgp_install_openkeychain_via">%s 経由でOpenKeychainをインストール</string>
+ <string name="openpgp_no_key_selected">鍵が選択されていません</string>
+ <string name="openpgp_key_selected">鍵は選択済みです</string>
</resources>
diff --git a/openpgp-api/src/main/res/values-nl/strings.xml b/openpgp-api/src/main/res/values-nl/strings.xml
index c757504..5093803 100644
--- a/openpgp-api/src/main/res/values-nl/strings.xml
+++ b/openpgp-api/src/main/res/values-nl/strings.xml
@@ -1,2 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+ <string name="openpgp_list_preference_none">Geen</string>
+ <string name="openpgp_install_openkeychain_via">Installeer OpenKeychain via %s</string>
+ <string name="openpgp_no_key_selected">Geen sleutel geselecteerd</string>
+ <string name="openpgp_key_selected">Sleutel is geselecteerd</string>
+</resources>
diff --git a/openpgp-api/src/main/res/values-pl/strings.xml b/openpgp-api/src/main/res/values-pl/strings.xml
index c757504..f42bfd0 100644
--- a/openpgp-api/src/main/res/values-pl/strings.xml
+++ b/openpgp-api/src/main/res/values-pl/strings.xml
@@ -1,2 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+ <string name="openpgp_list_preference_none">Brak</string>
+ <string name="openpgp_install_openkeychain_via">Instaluj OpenKeychain przez %s</string>
+</resources>
diff --git a/openpgp-api/src/main/res/values-ro/strings.xml b/openpgp-api/src/main/res/values-ro/strings.xml
new file mode 100644
index 0000000..c757504
--- /dev/null
+++ b/openpgp-api/src/main/res/values-ro/strings.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>
diff --git a/openpgp-api/src/main/res/values-ru/strings.xml b/openpgp-api/src/main/res/values-ru/strings.xml
index e8fd1dd..33e4277 100644
--- a/openpgp-api/src/main/res/values-ru/strings.xml
+++ b/openpgp-api/src/main/res/values-ru/strings.xml
@@ -2,4 +2,6 @@
<resources>
<string name="openpgp_list_preference_none">Нет</string>
<string name="openpgp_install_openkeychain_via">Установить OpenKeychain через %s</string>
+ <string name="openpgp_no_key_selected">Ключ не выбран</string>
+ <string name="openpgp_key_selected">Ключ был выбран</string>
</resources>
diff --git a/openpgp-api/src/main/res/values-sl/strings.xml b/openpgp-api/src/main/res/values-sl/strings.xml
index 20bf70b..74d4949 100644
--- a/openpgp-api/src/main/res/values-sl/strings.xml
+++ b/openpgp-api/src/main/res/values-sl/strings.xml
@@ -2,4 +2,6 @@
<resources>
<string name="openpgp_list_preference_none">Brez</string>
<string name="openpgp_install_openkeychain_via">Namesti OpenKeychain prek %s</string>
+ <string name="openpgp_no_key_selected">Izbran ni noben ključ</string>
+ <string name="openpgp_key_selected">Ključ je bil izbran</string>
</resources>
diff --git a/openpgp-api/src/main/res/values-sr/strings.xml b/openpgp-api/src/main/res/values-sr/strings.xml
new file mode 100644
index 0000000..4535f70
--- /dev/null
+++ b/openpgp-api/src/main/res/values-sr/strings.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+ <string name="openpgp_list_preference_none">Ништа</string>
+ <string name="openpgp_install_openkeychain_via">Инсталирај Отворени кључарник преко %s</string>
+ <string name="openpgp_no_key_selected">Није изабран кључ</string>
+ <string name="openpgp_key_selected">Кључ је изабран</string>
+</resources>
diff --git a/openpgp-api/src/main/res/values-sv/strings.xml b/openpgp-api/src/main/res/values-sv/strings.xml
new file mode 100644
index 0000000..1efa961
--- /dev/null
+++ b/openpgp-api/src/main/res/values-sv/strings.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+ <string name="openpgp_list_preference_none">Ingen</string>
+ <string name="openpgp_install_openkeychain_via">Installera OpenKeychain via %s</string>
+</resources>
diff --git a/openpgp-api/src/main/res/values-tr/strings.xml b/openpgp-api/src/main/res/values-tr/strings.xml
index c757504..a5f518d 100644
--- a/openpgp-api/src/main/res/values-tr/strings.xml
+++ b/openpgp-api/src/main/res/values-tr/strings.xml
@@ -1,2 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+ <string name="openpgp_list_preference_none">Hiç</string>
+ <string name="openpgp_install_openkeychain_via">%s aracılığıyla OpenKeychain\'i yükle</string>
+</resources>
diff --git a/openpgp-api/src/main/res/values-zh-rTW/strings.xml b/openpgp-api/src/main/res/values-zh-rTW/strings.xml
new file mode 100644
index 0000000..b911092
--- /dev/null
+++ b/openpgp-api/src/main/res/values-zh-rTW/strings.xml
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+ <string name="openpgp_list_preference_none">無</string>
+</resources>
diff --git a/openpgp-api/src/main/res/values-zh/strings.xml b/openpgp-api/src/main/res/values-zh/strings.xml
index c757504..ce62ff0 100644
--- a/openpgp-api/src/main/res/values-zh/strings.xml
+++ b/openpgp-api/src/main/res/values-zh/strings.xml
@@ -1,2 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+ <string name="openpgp_no_key_selected">尚未选择密钥</string>
+ <string name="openpgp_key_selected">已经选中密钥</string>
+</resources>