diff options
author | koem <koem@petoria.de> | 2011-10-10 17:18:49 +0200 |
---|---|---|
committer | koem <koem@petoria.de> | 2011-10-10 17:25:02 +0200 |
commit | bfa29b4962bee99f7b16b6900e424915fa2201e2 (patch) | |
tree | 0c3c48efd6716e1470fb740b66ef140a8dc3f987 /main/src/cgeo/geocaching/apps | |
parent | 6e950c529ab6d1df27841e88b4237180a2465b79 (diff) | |
parent | 6a775b8c3381470ae31c0f618070bd4d3d269262 (diff) | |
download | cgeo-bfa29b4962bee99f7b16b6900e424915fa2201e2.zip cgeo-bfa29b4962bee99f7b16b6900e424915fa2201e2.tar.gz cgeo-bfa29b4962bee99f7b16b6900e424915fa2201e2.tar.bz2 |
Merge remote branch 'upstream/master' into enums
Conflicts:
main/src/cgeo/geocaching/cgData.java
main/src/cgeo/geocaching/cgeodetail.java
Diffstat (limited to 'main/src/cgeo/geocaching/apps')
3 files changed, 7 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/apps/AbstractApp.java b/main/src/cgeo/geocaching/apps/AbstractApp.java index 1a166c6..7cf0b7f 100644 --- a/main/src/cgeo/geocaching/apps/AbstractApp.java +++ b/main/src/cgeo/geocaching/apps/AbstractApp.java @@ -1,6 +1,6 @@ package cgeo.geocaching.apps; -import cgeo.geocaching.utils.CollectionUtils; +import org.apache.commons.collections.CollectionUtils; import android.content.Context; import android.content.Intent; diff --git a/main/src/cgeo/geocaching/apps/LocusDataStorageProvider.java b/main/src/cgeo/geocaching/apps/LocusDataStorageProvider.java index 69a5e5b..6897f95 100644 --- a/main/src/cgeo/geocaching/apps/LocusDataStorageProvider.java +++ b/main/src/cgeo/geocaching/apps/LocusDataStorageProvider.java @@ -4,6 +4,8 @@ import menion.android.locus.addon.publiclib.geoData.PointsData; import menion.android.locus.addon.publiclib.utils.DataCursor; import menion.android.locus.addon.publiclib.utils.DataStorage; +import org.apache.commons.collections.CollectionUtils; + import android.content.ContentProvider; import android.content.ContentValues; import android.database.Cursor; @@ -24,7 +26,7 @@ public class LocusDataStorageProvider extends ContentProvider { DataCursor cursor = new DataCursor(new String[] { "data" }); ArrayList<PointsData> data = DataStorage.getData(); - if (data == null || data.size() == 0) { + if (CollectionUtils.isEmpty(data)) { return cursor; } diff --git a/main/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java b/main/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java index c08122a..e4afc31 100644 --- a/main/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java +++ b/main/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java @@ -4,6 +4,8 @@ import cgeo.geocaching.cgCache; import cgeo.geocaching.cgGeo; import cgeo.geocaching.apps.AbstractLocusApp; +import org.apache.commons.collections.CollectionUtils; + import android.app.Activity; import android.content.res.Resources; @@ -25,7 +27,7 @@ class LocusCacheListApp extends AbstractLocusApp implements CacheListApp { @Override public boolean invoke(cgGeo geo, List<cgCache> cacheList, Activity activity, Resources res, final UUID searchId) { - if (cacheList == null || cacheList.isEmpty()) + if (CollectionUtils.isEmpty(cacheList)) return false; showInLocus((List<? extends Object>) cacheList, false, activity); |