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,7 +200,8 @@ public class TileCache implements ITileCache {
mCacheBuffers.add(data); mCacheBuffers.add(data);
} }
log.debug("store tile {} {}", tile, Boolean.valueOf(success)); if (debug)
log.debug("store tile {} {}", tile, Boolean.valueOf(success));
if (!success) if (!success)
return; return;
@ -235,7 +237,8 @@ public class TileCache implements ITileCache {
mStmtGetTile.clearBindings(); mStmtGetTile.clearBindings();
} }
log.debug("load tile {}", tile); if (debug)
log.debug("load tile {}", tile);
return new CacheTileReader(tile, in, Integer.MAX_VALUE); return new CacheTileReader(tile, in, Integer.MAX_VALUE);
} }
@ -257,7 +260,8 @@ 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()) {
log.debug("not in cache {}", tile); if (debug)
log.debug("not in cache {}", tile);
return null; return null;
} }
@ -266,7 +270,8 @@ public class TileCache implements ITileCache {
if (!cursor.isClosed()) if (!cursor.isClosed())
cursor.close(); cursor.close();
log.debug("load tile {}", tile); if (debug)
log.debug("load tile {}", tile);
return new CacheTileReader(tile, in, Integer.MAX_VALUE); return new CacheTileReader(tile, in, Integer.MAX_VALUE);
} }