aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/cgData.java6
-rw-r--r--main/src/cgeo/geocaching/cgeo.java2
-rw-r--r--main/src/cgeo/geocaching/cgeoapplication.java5
-rw-r--r--main/src/cgeo/geocaching/cgeoinit.java2
4 files changed, 10 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/cgData.java b/main/src/cgeo/geocaching/cgData.java
index 604137a..11b2ddb 100644
--- a/main/src/cgeo/geocaching/cgData.java
+++ b/main/src/cgeo/geocaching/cgData.java
@@ -2197,14 +2197,14 @@ public class cgData {
}
/**
- * Number of caches stored. The number is shown on the starting activitiy of c:geo
+ * Number of caches stored. The number is shown on the starting activity of c:geo
*
* @param detailedOnly
* @param cacheType
* @param list
* @return
*/
- public int getAllStoredCachesCount(final boolean detailedOnly, final CacheType cacheType, final Integer list) {
+ public int getAllStoredCachesCount(final boolean detailedOnly, final CacheType cacheType, final int list) {
if (cacheType == null) {
throw new IllegalArgumentException("cacheType must not be null");
}
@@ -2212,7 +2212,7 @@ public class cgData {
String listSql = null;
String listSqlW = null;
- if (list == null) {
+ if (list == 0) {
listSql = " where reason >= 1";
listSqlW = " and reason >= 1";
} else if (list >= 1) {
diff --git a/main/src/cgeo/geocaching/cgeo.java b/main/src/cgeo/geocaching/cgeo.java
index 86f8824..8fa6f60 100644
--- a/main/src/cgeo/geocaching/cgeo.java
+++ b/main/src/cgeo/geocaching/cgeo.java
@@ -790,7 +790,7 @@ public class cgeo extends AbstractActivity {
}
}
- countBubbleCnt = app.getAllStoredCachesCount(true, CacheType.ALL, null);
+ countBubbleCnt = app.getAllStoredCachesCount(true, CacheType.ALL);
countBubbleHandler.sendEmptyMessage(0);
}
diff --git a/main/src/cgeo/geocaching/cgeoapplication.java b/main/src/cgeo/geocaching/cgeoapplication.java
index 8b5eb57..9324d52 100644
--- a/main/src/cgeo/geocaching/cgeoapplication.java
+++ b/main/src/cgeo/geocaching/cgeoapplication.java
@@ -319,6 +319,11 @@ public class cgeoapplication extends Application {
}
/** {@link cgData#getAllStoredCachesCount(boolean, CacheType, Integer)} */
+ public int getAllStoredCachesCount(final boolean detailedOnly, final CacheType cacheType) {
+ return storage.getAllStoredCachesCount(detailedOnly, cacheType, 0);
+ }
+
+ /** {@link cgData#getAllStoredCachesCount(boolean, CacheType, Integer)} */
public int getAllStoredCachesCount(final boolean detailedOnly, final CacheType cacheType, final Integer list) {
return storage.getAllStoredCachesCount(detailedOnly, cacheType, list);
}
diff --git a/main/src/cgeo/geocaching/cgeoinit.java b/main/src/cgeo/geocaching/cgeoinit.java
index 2269ad7..ee83f2d 100644
--- a/main/src/cgeo/geocaching/cgeoinit.java
+++ b/main/src/cgeo/geocaching/cgeoinit.java
@@ -699,7 +699,7 @@ public class cgeoinit extends AbstractActivity {
*/
public void backup(View view) {
// avoid overwriting an existing backup with an empty database (can happen directly after reinstalling the app)
- if (app.getAllStoredCachesCount(true, CacheType.ALL, null) == 0) {
+ if (app.getAllStoredCachesCount(true, CacheType.ALL) == 0) {
helpDialog(res.getString(R.string.init_backup), res.getString(R.string.init_backup_unnecessary));
return;
}