blob: d047d1ab354527caf5ba63ccd0f2e83cf99a2322 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package cgeo.geocaching.apps.cachelist;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.R;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.apps.AbstractLocusApp;
import org.apache.commons.collections4.CollectionUtils;
import android.app.Activity;
import android.content.Intent;
import java.util.List;
abstract class AbstractLocusCacheListApp extends AbstractLocusApp implements CacheListApp {
private final boolean export;
public AbstractLocusCacheListApp(final int id, final boolean export) {
super(getString(export ? R.string.caches_map_locus_export : R.string.caches_map_locus), id, Intent.ACTION_VIEW);
this.export = export;
}
/**
* show caches in Locus
*
* @see AbstractLocusApp#showInLocus
*/
@Override
public boolean invoke(final List<Geocache> cacheList, final Activity activity, final SearchResult search) {
if (CollectionUtils.isEmpty(cacheList)) {
return false;
}
showInLocus(cacheList, false, export, activity);
return true;
}
}
|