diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-11 20:16:30 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-11 20:16:30 +0200 |
commit | 9aa5f23788f19689fb172fd209de72bc6941afdf (patch) | |
tree | 089ebe5effed06645310f0d51466f2d787f8c12f /src | |
parent | 6bec5eedde31bacbafcb541a728719eeff99d3b7 (diff) |
Support mime type in metadata
Diffstat (limited to 'src')
-rw-r--r-- | src/org/openintents/openpgp/OpenPgpDecryptMetadata.java | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/org/openintents/openpgp/OpenPgpDecryptMetadata.java b/src/org/openintents/openpgp/OpenPgpDecryptMetadata.java index cfb50745..832feb8d 100644 --- a/src/org/openintents/openpgp/OpenPgpDecryptMetadata.java +++ b/src/org/openintents/openpgp/OpenPgpDecryptMetadata.java @@ -32,14 +32,18 @@ public class OpenPgpDecryptMetadata implements Parcelable { public static final int PARCELABLE_VERSION = 1; String filename; + String mimeType; long modificationTime; - int format; long originalSize; public String getFilename() { return filename; } + public String getMimeType() { + return mimeType; + } + public long getModificationTime() { return modificationTime; } @@ -48,25 +52,21 @@ public class OpenPgpDecryptMetadata implements Parcelable { return originalSize; } - public int getFormat() { - return format; - } - public OpenPgpDecryptMetadata() { } - public OpenPgpDecryptMetadata(String filename, long modificationTime, - int format, long originalSize) { + public OpenPgpDecryptMetadata(String filename, String mimeType, long modificationTime, + long originalSize) { this.filename = filename; + this.mimeType = mimeType; this.modificationTime = modificationTime; - this.format = format; this.originalSize = originalSize; } public OpenPgpDecryptMetadata(OpenPgpDecryptMetadata b) { this.filename = b.filename; + this.mimeType = b.mimeType; this.modificationTime = b.modificationTime; - this.format = b.format; this.originalSize = b.originalSize; } @@ -87,8 +87,8 @@ public class OpenPgpDecryptMetadata implements Parcelable { int startPosition = dest.dataPosition(); // version 1 dest.writeString(filename); + dest.writeString(mimeType); dest.writeLong(modificationTime); - dest.writeInt(format); dest.writeLong(originalSize); // Go back and write the size int parcelableSize = dest.dataPosition() - startPosition; @@ -105,8 +105,8 @@ public class OpenPgpDecryptMetadata implements Parcelable { OpenPgpDecryptMetadata vr = new OpenPgpDecryptMetadata(); vr.filename = source.readString(); + vr.mimeType = source.readString(); vr.modificationTime = source.readLong(); - vr.format = source.readInt(); vr.originalSize = source.readLong(); // skip over all fields added in future versions of this parcel @@ -122,10 +122,9 @@ public class OpenPgpDecryptMetadata implements Parcelable { @Override public String toString() { - String out = new String(); - out += "\nfilename: " + filename; + String out = "\nfilename: " + filename; + out += "\nmimeType: " + mimeType; out += "\nmodificationTime: " + modificationTime; - out += "\nformat: " + format; out += "\noriginalSize: " + originalSize; return out; } |