Clarify MIME usage

This commit is contained in:
Dominik Schürmann 2015-03-15 21:17:24 +01:00
parent d824ec3bc9
commit 5cb22ece30
3 changed files with 7 additions and 2 deletions

View File

@ -42,6 +42,11 @@ public final class Constants {
// as defined in http://tools.ietf.org/html/rfc3156, section 7
public static final String NFC_MIME = "application/pgp-keys";
// as defined in http://tools.ietf.org/html/rfc3156
// we don't use application/pgp-encrypted as it only holds the version number
public static final String ENCRYPTED_FILES_MIME = "application/octet-stream";
public static final String ENCRYPTED_TEXT_MIME = "text/plain";
// used by QR Codes (Guardian Project, Monkeysphere compatiblity)
public static final String FINGERPRINT_SCHEME = "openpgp4fpr";

View File

@ -268,7 +268,7 @@ public class EncryptFilesActivity extends EncryptActivity implements EncryptActi
sendIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
sendIntent.putExtra(Intent.EXTRA_STREAM, mOutputUris);
}
sendIntent.setType("application/octet-stream");
sendIntent.setType(Constants.ENCRYPTED_FILES_MIME);
if (!isModeSymmetric() && mEncryptionUserIds != null) {
Set<String> users = new HashSet<>();

View File

@ -247,7 +247,7 @@ public class EncryptTextActivity extends EncryptActivity implements EncryptActiv
private Intent createSendIntent(byte[] resultBytes) {
Intent sendIntent;
sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("text/plain");
sendIntent.setType(Constants.ENCRYPTED_TEXT_MIME);
sendIntent.putExtra(Intent.EXTRA_TEXT, new String(resultBytes));
if (!isModeSymmetric() && mEncryptionUserIds != null) {