add utility to erase all thumbnails

This commit is contained in:
Eric House 2013-11-09 06:36:47 -08:00
parent dfdbd9a8a2
commit 82f61b43f2

View file

@ -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;