Advertisement
Guest User

Tastebin - Tkabber Plugin

a guest
Jun 3rd, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. ContentValues values = new ContentValues();
  2. values.put(SENDING_STATE, (int) md.getIconIndex());
  3. long delay = System.currentTimeMillis();
  4. Cursor cursor = db.query(CHAT_HISTORY_TABLE, null, null, null, null, null, null);
  5. if (cursor.moveToFirst()) {
  6. do {
  7. int id = cursor.getInt(cursor.getColumnIndex(COLUMN_ID));
  8. String where = COLUMN_ID + "='" + id + "'";
  9. db.update(CHAT_HISTORY_TABLE, values, where, null);
  10. } while (cursor.moveToNext());
  11. }
  12. cursor.close();
  13. Log.e("updateText", "delay = "+(System.currentTimeMillis() - delay));
  14.  
  15. long delay2 = System.currentTimeMillis();
  16. String wh = COLUMN_ID + "='" + md.getNick() + "' AND " + MESSAGE + "='" + md.getText().toString() + "'";
  17. db.update(CHAT_HISTORY_TABLE, values, wh, null);
  18. Log.e("updateText", "delay2 = "+(System.currentTimeMillis() - delay2));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement