Skip to content

Commit 9e49835

Browse files
committed
Fix crash getting audio duration
1 parent 9083018 commit 9e49835

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/src/main/java/org/thoughtcrime/securesms/database/AttachmentDatabase.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ public class AttachmentDatabase extends Database {
134134
CAPTION, STICKER_PACK_ID, STICKER_PACK_KEY, STICKER_ID, URL,
135135
AUDIO_DURATION};
136136

137-
private static final String[] PROJECTION_AUDIO_EXTRAS = new String[] {AUDIO_VISUAL_SAMPLES};
138-
139137
public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + ROW_ID + " INTEGER PRIMARY KEY, " +
140138
MMS_ID + " INTEGER, " + "seq" + " INTEGER DEFAULT 0, " +
141139
CONTENT_TYPE + " TEXT, " + NAME + " TEXT, " + "chset" + " INTEGER, " +
@@ -848,7 +846,7 @@ protected void updateAttachmentThumbnail(AttachmentId attachmentId, InputStream
848846
try (Cursor cursor = getReadableDatabase()
849847
// We expect all the audio extra values to be present (not null) or reject the whole record.
850848
.query(TABLE_NAME,
851-
PROJECTION_AUDIO_EXTRAS,
849+
new String[] {AUDIO_VISUAL_SAMPLES, AUDIO_DURATION},
852850
PART_ID_WHERE +
853851
" AND " + AUDIO_VISUAL_SAMPLES + " IS NOT NULL" +
854852
" AND " + AUDIO_DURATION + " IS NOT NULL" +

0 commit comments

Comments
 (0)