mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
toss cache after reading in new DB
This commit is contained in:
parent
3ccc9ac0f1
commit
e9efc27d7a
1 changed files with 3 additions and 1 deletions
|
@ -991,10 +991,11 @@ public class DBUtils {
|
|||
if ( null == s_groupsCache ) {
|
||||
HashMap<Long,GameGroupInfo> result =
|
||||
new HashMap<Long,GameGroupInfo>();
|
||||
initDB( context );
|
||||
String[] columns = { ROW_ID, DBHelper.GROUPNAME,
|
||||
DBHelper.EXPANDED };
|
||||
String limit = 0 == nRows ? null : String.format( "%d", nRows );
|
||||
|
||||
initDB( context );
|
||||
synchronized( s_dbHelper ) {
|
||||
SQLiteDatabase db = s_dbHelper.getReadableDatabase();
|
||||
Cursor cursor = db.query( DBHelper.TABLE_NAME_GROUPS, columns,
|
||||
|
@ -1576,6 +1577,7 @@ public class DBUtils {
|
|||
FileOutputStream dest =
|
||||
new FileOutputStream( toSDCard? sdcardDB : gamesDB );
|
||||
copyFileStream( dest, src );
|
||||
invalGroupsCache();
|
||||
}
|
||||
} catch( java.io.FileNotFoundException fnfe ) {
|
||||
DbgUtils.loge( fnfe );
|
||||
|
|
Loading…
Reference in a new issue