disable debug

This commit is contained in:
Hannes Janetzek
2014-01-21 17:22:37 +01:00
parent 154da99d40
commit b2f0bd0e3d

View File

@@ -40,6 +40,7 @@ import android.os.ParcelFileDescriptor;
public class TileCache implements ITileCache { public class TileCache implements ITileCache {
final static org.slf4j.Logger log = LoggerFactory.getLogger(TileCache.class); final static org.slf4j.Logger log = LoggerFactory.getLogger(TileCache.class);
final static boolean debug = false;
class CacheTileReader implements TileReader { class CacheTileReader implements TileReader {
final InputStream mInputStream; final InputStream mInputStream;
@@ -199,6 +200,7 @@ public class TileCache implements ITileCache {
mCacheBuffers.add(data); mCacheBuffers.add(data);
} }
if (debug)
log.debug("store tile {} {}", tile, Boolean.valueOf(success)); log.debug("store tile {} {}", tile, Boolean.valueOf(success));
if (!success) if (!success)
@@ -235,6 +237,7 @@ public class TileCache implements ITileCache {
mStmtGetTile.clearBindings(); mStmtGetTile.clearBindings();
} }
if (debug)
log.debug("load tile {}", tile); log.debug("load tile {}", tile);
return new CacheTileReader(tile, in, Integer.MAX_VALUE); return new CacheTileReader(tile, in, Integer.MAX_VALUE);
@@ -257,6 +260,7 @@ public class TileCache implements ITileCache {
" WHERE z=? AND x=? AND y=?", mQueryVals); " WHERE z=? AND x=? AND y=?", mQueryVals);
if (!cursor.moveToFirst()) { if (!cursor.moveToFirst()) {
if (debug)
log.debug("not in cache {}", tile); log.debug("not in cache {}", tile);
return null; return null;
} }
@@ -266,6 +270,7 @@ public class TileCache implements ITileCache {
if (!cursor.isClosed()) if (!cursor.isClosed())
cursor.close(); cursor.close();
if (debug)
log.debug("load tile {}", tile); log.debug("load tile {}", tile);
return new CacheTileReader(tile, in, Integer.MAX_VALUE); return new CacheTileReader(tile, in, Integer.MAX_VALUE);