Fix crash when updating empty thread on failed send.

This commit is contained in:
Cody Henthorne
2021-08-17 10:58:57 -04:00
parent 2b366f8c9c
commit d76e58ce09

View File

@@ -1283,11 +1283,16 @@ public class ThreadDatabase extends Database {
}
public void updateSnippetTypeSilently(long threadId) {
if (threadId == -1) {
return;
}
long type;
try {
type = DatabaseFactory.getMmsSmsDatabase(context).getConversationSnippetType(threadId);
} 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);