Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ContentValues values = new ContentValues();
- values.put(SENDING_STATE, (int) md.getIconIndex());
- long delay = System.currentTimeMillis();
- Cursor cursor = db.query(CHAT_HISTORY_TABLE, null, null, null, null, null, null);
- if (cursor.moveToFirst()) {
- do {
- int id = cursor.getInt(cursor.getColumnIndex(COLUMN_ID));
- String where = COLUMN_ID + "='" + id + "'";
- db.update(CHAT_HISTORY_TABLE, values, where, null);
- } while (cursor.moveToNext());
- }
- cursor.close();
- Log.e("updateText", "delay = "+(System.currentTimeMillis() - delay));
- long delay2 = System.currentTimeMillis();
- String wh = COLUMN_ID + "='" + md.getNick() + "' AND " + MESSAGE + "='" + md.getText().toString() + "'";
- db.update(CHAT_HISTORY_TABLE, values, wh, null);
- Log.e("updateText", "delay2 = "+(System.currentTimeMillis() - delay2));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement