Fix crash when updating empty thread on failed send.

fork-5.53.8
Cody Henthorne 2021-08-17 10:58:57 -04:00
rodzic 2b366f8c9c
commit d76e58ce09
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -1283,11 +1283,16 @@ public class ThreadDatabase extends Database {
} }
public void updateSnippetTypeSilently(long threadId) { public void updateSnippetTypeSilently(long threadId) {
if (threadId == -1) {
return;
}
long type; long type;
try { try {
type = DatabaseFactory.getMmsSmsDatabase(context).getConversationSnippetType(threadId); type = DatabaseFactory.getMmsSmsDatabase(context).getConversationSnippetType(threadId);
} catch (NoSuchMessageException e) { } catch (NoSuchMessageException e) {
throw new AssertionError(e); Log.w(TAG, "Unable to find snippet message for thread: " + threadId, e);
return;
} }
ContentValues contentValues = new ContentValues(1); ContentValues contentValues = new ContentValues(1);