diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-10-05 11:11:16 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-10-05 11:11:16 +0200 |
commit | 34345cf2373dbe948a0c39311a7b70d0cee205cf (patch) | |
tree | 5320613376ab525f2880314f511771d595f2e36a /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java | |
parent | 669991727900953abaff35f0cabb13427485b62a (diff) | |
download | open-keychain-34345cf2373dbe948a0c39311a7b70d0cee205cf.tar.gz open-keychain-34345cf2373dbe948a0c39311a7b70d0cee205cf.tar.bz2 open-keychain-34345cf2373dbe948a0c39311a7b70d0cee205cf.zip |
use sub results in import
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java | 9 |
1 files changed, 8 insertions, 1 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 495f9f861..d65a84e5b 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 @@ -641,7 +641,7 @@ public abstract class OperationResult implements Parcelable { public void add(OperationResult subResult, int indent) { OperationLog subLog = subResult.getLog(); - mParcels.add(new SubLogEntryParcel(subResult, subLog.getLast().mType, indent, subLog.getLast().mParameters)); + mParcels.add(new SubLogEntryParcel(subResult, subLog.getFirst().mType, indent, subLog.getFirst().mParameters)); } public void clear() { @@ -678,6 +678,13 @@ public abstract class OperationResult implements Parcelable { return mParcels.isEmpty(); } + public LogEntryParcel getFirst() { + if (mParcels.isEmpty()) { + return null; + } + return mParcels.get(0); + } + public LogEntryParcel getLast() { if (mParcels.isEmpty()) { return null; |