Using add/replace instead of update when updating an entry.

Update operation was not including version and updateTime columns
leading to a update operation getting called wheneven launcher loads.

Bug: 32004297
Change-Id: I5f1793633ce3bb72d5641a82502b3ba8b9cdff7d
This commit is contained in:
Sunny Goyal
2016-10-07 09:46:49 -07:00
parent 70a421e224
commit caa52918f1
2 changed files with 9 additions and 23 deletions
@@ -28,22 +28,6 @@ public abstract class SQLiteCacheHelper {
mIgnoreWrites = false;
}
/**
* @see SQLiteDatabase#update(String, ContentValues, String, String[])
*/
public void update(ContentValues values, String whereClause, String[] whereArgs) {
if (mIgnoreWrites) {
return;
}
try {
mOpenHelper.getWritableDatabase().update(mTableName, values, whereClause, whereArgs);
} catch (SQLiteFullException e) {
onDiskFull(e);
} catch (SQLiteException e) {
Log.d(TAG, "Ignoring sqlite exception", e);
}
}
/**
* @see SQLiteDatabase#delete(String, String, String[])
*/