diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-06-06 16:14:15 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-06-06 16:14:15 +0200 |
commit | b995b836a38ef8a87aa189f408f8542bf5a2c94c (patch) | |
tree | 0828f6fc64152b1c1113c5ce31ccc21495e019d5 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp | |
parent | c84a1ecfff8d3f21ac83ef7b041f22f11e38936b (diff) | |
download | open-keychain-b995b836a38ef8a87aa189f408f8542bf5a2c94c.tar.gz open-keychain-b995b836a38ef8a87aa189f408f8542bf5a2c94c.tar.bz2 open-keychain-b995b836a38ef8a87aa189f408f8542bf5a2c94c.zip |
import-log: improve operationresultparcel, add indentation
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/OperationResultParcel.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/OperationResultParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/OperationResultParcel.java index 497c3dd71..f2da4389d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/OperationResultParcel.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/OperationResultParcel.java @@ -1,9 +1,10 @@ package org.sufficientlysecure.keychain.pgp; -import android.R; import android.os.Parcel; import android.os.Parcelable; +import org.sufficientlysecure.keychain.R; + import java.util.ArrayList; /** Represent the result of an operation. @@ -39,20 +40,26 @@ public class OperationResultParcel implements Parcelable { /** One entry in the log. */ public static class LogEntryParcel implements Parcelable { - final LogType mType; final LogLevel mLevel; + final LogType mType; final String[] mParameters; + final int mIndent; - public LogEntryParcel(LogType type, LogLevel level, String[] parameters) { - mType = type; + public LogEntryParcel(LogLevel level, LogType type, String[] parameters, int indent) { mLevel = level; + mType = type; mParameters = parameters; + mIndent = indent; + } + public LogEntryParcel(LogLevel level, LogType type, String[] parameters) { + this(level, type, parameters, 0); } public LogEntryParcel(Parcel source) { - mType = LogType.values()[source.readInt()]; mLevel = LogLevel.values()[source.readInt()]; + mType = LogType.values()[source.readInt()]; mParameters = source.createStringArray(); + mIndent = source.readInt(); } @Override @@ -62,9 +69,10 @@ public class OperationResultParcel implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(mType.ordinal()); dest.writeInt(mLevel.ordinal()); + dest.writeInt(mType.ordinal()); dest.writeStringArray(mParameters); + dest.writeInt(mIndent); } public static final Creator<LogEntryParcel> CREATOR = new Creator<LogEntryParcel>() { |