From b2f0bd0e3df1c829a6808a4cba9d38d204f64193 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Tue, 21 Jan 2014 17:22:37 +0100 Subject: [PATCH] disable debug --- .../src/org/oscim/android/cache/TileCache.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/vtm-android/src/org/oscim/android/cache/TileCache.java b/vtm-android/src/org/oscim/android/cache/TileCache.java index dc8ff5c1..f5de3e00 100644 --- a/vtm-android/src/org/oscim/android/cache/TileCache.java +++ b/vtm-android/src/org/oscim/android/cache/TileCache.java @@ -40,6 +40,7 @@ import android.os.ParcelFileDescriptor; public class TileCache implements ITileCache { final static org.slf4j.Logger log = LoggerFactory.getLogger(TileCache.class); + final static boolean debug = false; class CacheTileReader implements TileReader { final InputStream mInputStream; @@ -199,7 +200,8 @@ public class TileCache implements ITileCache { mCacheBuffers.add(data); } - log.debug("store tile {} {}", tile, Boolean.valueOf(success)); + if (debug) + log.debug("store tile {} {}", tile, Boolean.valueOf(success)); if (!success) return; @@ -235,7 +237,8 @@ public class TileCache implements ITileCache { mStmtGetTile.clearBindings(); } - log.debug("load tile {}", tile); + if (debug) + log.debug("load tile {}", tile); return new CacheTileReader(tile, in, Integer.MAX_VALUE); } @@ -257,7 +260,8 @@ public class TileCache implements ITileCache { " WHERE z=? AND x=? AND y=?", mQueryVals); if (!cursor.moveToFirst()) { - log.debug("not in cache {}", tile); + if (debug) + log.debug("not in cache {}", tile); return null; } @@ -266,7 +270,8 @@ public class TileCache implements ITileCache { if (!cursor.isClosed()) cursor.close(); - log.debug("load tile {}", tile); + if (debug) + log.debug("load tile {}", tile); return new CacheTileReader(tile, in, Integer.MAX_VALUE); }