diff options
Diffstat (limited to 'src/eu/siacs/conversations/persistance')
-rw-r--r-- | src/eu/siacs/conversations/persistance/DatabaseBackend.java | 4 | ||||
-rw-r--r-- | src/eu/siacs/conversations/persistance/FileBackend.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java index 22871a9e..2a403fab 100644 --- a/src/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -137,7 +137,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { public CopyOnWriteArrayList<Conversation> getConversations(int status) { CopyOnWriteArrayList<Conversation> list = new CopyOnWriteArrayList<Conversation>(); SQLiteDatabase db = this.getReadableDatabase(); - String[] selectionArgs = { "" + status }; + String[] selectionArgs = { Integer.toString(status) }; Cursor cursor = db.rawQuery("select * from " + Conversation.TABLENAME + " where " + Conversation.STATUS + " = ? order by " + Conversation.CREATED + " desc", selectionArgs); @@ -163,7 +163,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { + "=?", selectionArgs, null, null, Message.TIME_SENT + " DESC", String.valueOf(limit)); } else { - String[] selectionArgs = { conversation.getUuid(), "" + timestamp }; + String[] selectionArgs = { conversation.getUuid(), Long.toString(timestamp) }; cursor = db.query(Message.TABLENAME, null, Message.CONVERSATION + "=? and " + Message.TIME_SENT + "<?", selectionArgs, null, null, Message.TIME_SENT + " DESC", diff --git a/src/eu/siacs/conversations/persistance/FileBackend.java b/src/eu/siacs/conversations/persistance/FileBackend.java index 6e16240d..0af9c6e2 100644 --- a/src/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/eu/siacs/conversations/persistance/FileBackend.java @@ -180,7 +180,7 @@ public class FileBackend { long size = file.getSize(); int width = scalledBitmap.getWidth(); int height = scalledBitmap.getHeight(); - message.setBody("" + size + "," + width + "," + height); + message.setBody(Long.toString(size) + ',' + width + ',' + height); return file; } catch (FileNotFoundException e) { throw new ImageCopyException(R.string.error_file_not_found); |