TileCache: remove unused size field
This commit is contained in:
@@ -45,12 +45,10 @@ public class TileCache implements ITileCache {
|
||||
class CacheTileReader implements TileReader {
|
||||
final InputStream mInputStream;
|
||||
final Tile mTile;
|
||||
final int mSize;
|
||||
|
||||
public CacheTileReader(Tile tile, InputStream is, int size) {
|
||||
public CacheTileReader(Tile tile, InputStream is) {
|
||||
mTile = tile;
|
||||
mInputStream = is;
|
||||
mSize = size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,11 +60,6 @@ public class TileCache implements ITileCache {
|
||||
public InputStream getInputStream() {
|
||||
return mInputStream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBytes() {
|
||||
return mSize;
|
||||
}
|
||||
}
|
||||
|
||||
class CacheTileWriter implements TileWriter {
|
||||
@@ -190,6 +183,7 @@ public class TileCache implements ITileCache {
|
||||
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
|
||||
onCreate(db);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
onUpgrade(db, oldVersion, newVersion);
|
||||
@@ -247,7 +241,7 @@ public class TileCache implements ITileCache {
|
||||
if (dbg)
|
||||
log.debug("load tile {}", tile);
|
||||
|
||||
return new CacheTileReader(tile, in, Integer.MAX_VALUE);
|
||||
return new CacheTileReader(tile, in);
|
||||
}
|
||||
|
||||
private final String[] mQueryVals = new String[3];
|
||||
@@ -280,7 +274,7 @@ public class TileCache implements ITileCache {
|
||||
if (dbg)
|
||||
log.debug("load tile {}", tile);
|
||||
|
||||
return new CacheTileReader(tile, in, Integer.MAX_VALUE);
|
||||
return new CacheTileReader(tile, in);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,7 +38,7 @@ public interface ITileCache {
|
||||
* @param tile
|
||||
* The accessed tile.
|
||||
* @return
|
||||
* The stored file for this tile.
|
||||
* The stored file for this tile or null if tile is not stored.
|
||||
*/
|
||||
TileReader getTile(Tile tile);
|
||||
|
||||
@@ -52,8 +52,6 @@ public interface ITileCache {
|
||||
Tile getTile();
|
||||
|
||||
InputStream getInputStream();
|
||||
|
||||
int getBytes();
|
||||
}
|
||||
|
||||
public interface TileWriter {
|
||||
|
||||
Reference in New Issue
Block a user