mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Raise history limit to 2000
git-svn-id: https://zxing.googlecode.com/svn/trunk@2520 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
29934305d7
commit
f41a07ebcd
|
@ -53,7 +53,7 @@ public final class HistoryManager {
|
|||
|
||||
private static final String TAG = HistoryManager.class.getSimpleName();
|
||||
|
||||
private static final int MAX_ITEMS = 500;
|
||||
private static final int MAX_ITEMS = 2000;
|
||||
|
||||
private static final String[] COLUMNS = {
|
||||
DBHelper.TEXT_COL,
|
||||
|
@ -238,7 +238,9 @@ public final class HistoryManager {
|
|||
DBHelper.TIMESTAMP_COL + " DESC");
|
||||
cursor.move(MAX_ITEMS);
|
||||
while (cursor.moveToNext()) {
|
||||
db.delete(DBHelper.TABLE_NAME, DBHelper.ID_COL + '=' + cursor.getString(0), null);
|
||||
String id = cursor.getString(0);
|
||||
Log.i(TAG, "Deleting scan history ID " + id);
|
||||
db.delete(DBHelper.TABLE_NAME, DBHelper.ID_COL + '=' + id, null);
|
||||
}
|
||||
} catch (SQLiteException sqle) {
|
||||
// We're seeing an error here when called in CaptureActivity.onCreate() in rare cases
|
||||
|
|
Loading…
Reference in a new issue