From 82f61b43f23ddc35b8a950ebfae73629c5ec5861 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 9 Nov 2013 06:36:47 -0800 Subject: [PATCH] add utility to erase all thumbnails --- .../src/org/eehouse/android/xw4/DBUtils.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java index 2286ebad0..d394f7075 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java @@ -466,6 +466,23 @@ public class DBUtils { } } + public static void clearThumbnails( Context context ) + { + if ( GitVersion.THUMBNAIL_SUPPORTED ) { + initDB( context ); + synchronized( s_dbHelper ) { + SQLiteDatabase db = s_dbHelper.getWritableDatabase(); + ContentValues values = new ContentValues(); + values.putNull( DBHelper.THUMBNAIL ); + long result = db.update( DBHelper.TABLE_NAME_SUM, + values, null, null ); + db.close(); + + notifyListeners( -1, true ); + } + } + } + public static String getRelayID( Context context, long rowid ) { String result = null;