mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-26 00:48:51 -05:00
Merge pull request #710 from mar-v-in/patch-1
Fix OperationResultParcel
This commit is contained in:
commit
9fcc0a8816
@ -305,20 +305,20 @@ public class OperationResultParcel implements Parcelable {
|
||||
|
||||
public static class OperationLog implements Iterable<LogEntryParcel> {
|
||||
|
||||
private final List<LogEntryParcel> parcels = new ArrayList<LogEntryParcel>();
|
||||
private final List<LogEntryParcel> mParcels = new ArrayList<LogEntryParcel>();
|
||||
|
||||
/// Simple convenience method
|
||||
public void add(LogLevel level, LogType type, int indent, Object... parameters) {
|
||||
Log.d(Constants.TAG, type.toString());
|
||||
parcels.add(new OperationResultParcel.LogEntryParcel(level, type, indent, parameters));
|
||||
mParcels.add(new OperationResultParcel.LogEntryParcel(level, type, indent, parameters));
|
||||
}
|
||||
|
||||
public void add(LogLevel level, LogType type, int indent) {
|
||||
parcels.add(new OperationResultParcel.LogEntryParcel(level, type, indent, (Object[]) null));
|
||||
mParcels.add(new OperationResultParcel.LogEntryParcel(level, type, indent, (Object[]) null));
|
||||
}
|
||||
|
||||
public boolean containsWarnings() {
|
||||
for(LogEntryParcel entry : new IterableIterator<LogEntryParcel>(parcels.iterator())) {
|
||||
for(LogEntryParcel entry : new IterableIterator<LogEntryParcel>(mParcels.iterator())) {
|
||||
if (entry.mLevel == LogLevel.WARN || entry.mLevel == LogLevel.ERROR) {
|
||||
return true;
|
||||
}
|
||||
@ -327,20 +327,20 @@ public class OperationResultParcel implements Parcelable {
|
||||
}
|
||||
|
||||
public void addAll(List<LogEntryParcel> parcels) {
|
||||
parcels.addAll(parcels);
|
||||
mParcels.addAll(parcels);
|
||||
}
|
||||
|
||||
public List<LogEntryParcel> toList() {
|
||||
return parcels;
|
||||
return mParcels;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return parcels.isEmpty();
|
||||
return mParcels.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<LogEntryParcel> iterator() {
|
||||
return parcels.iterator();
|
||||
return mParcels.iterator();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user