diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-10-08 17:32:41 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-10-08 17:32:41 +0200 |
commit | 158f22a799e6a51dff64aa54303bf4bb7b495b4e (patch) | |
tree | 515d2f304dbbd16e27305d46295005d5eb15c9c5 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results | |
parent | b573afe2359653d0ddeb9f35075ca22af40b0ab4 (diff) | |
parent | 590650a3039ebabe820241bf8709569812aad7a8 (diff) | |
download | open-keychain-158f22a799e6a51dff64aa54303bf4bb7b495b4e.tar.gz open-keychain-158f22a799e6a51dff64aa54303bf4bb7b495b4e.tar.bz2 open-keychain-158f22a799e6a51dff64aa54303bf4bb7b495b4e.zip |
Merge branch 'development' of github.com:open-keychain/open-keychain into development
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java index d65a84e5b..e3f2c1cc5 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java @@ -93,6 +93,11 @@ public abstract class OperationResult implements Parcelable { } public OperationLog getLog() { + // If there is only a single entry, and it's a compound one, return that log + if (mLog.isSingleCompound()) { + return ((SubLogEntryParcel) mLog.getFirst()).getSubResult().getLog(); + } + // Otherwse, return our regular log return mLog; } @@ -644,6 +649,10 @@ public abstract class OperationResult implements Parcelable { mParcels.add(new SubLogEntryParcel(subResult, subLog.getFirst().mType, indent, subLog.getFirst().mParameters)); } + boolean isSingleCompound() { + return mParcels.size() == 1 && getFirst() instanceof SubLogEntryParcel; + } + public void clear() { mParcels.clear(); } |