| 114 | |
| 115 | new SimpleTask<List<EntityLog>>() { |
| 116 | @Override |
| 117 | protected List<EntityLog> onExecute(Context context, Bundle args) throws Throwable { |
| 118 | List<EntityLog> items = new ArrayList<>(); |
| 119 | for (EntityLog log : logs) |
| 120 | if (account == null && folder == null && message == null) { |
| 121 | if (types.contains(log.type)) |
| 122 | items.add(log); |
| 123 | } else { |
| 124 | if ((account == null || account.equals(log.account)) && |
| 125 | (folder == null || folder.equals(log.folder)) && |
| 126 | (message == null || message.equals(log.message))) |
| 127 | items.add(log); |
| 128 | } |
| 129 | return items; |
| 130 | } |
| 131 | |
| 132 | @Override |
| 133 | protected void onExecuted(Bundle args, List<EntityLog> items) { |