kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix deadlock between group calling jobs.
rodzic
82eebbc3b0
commit
ac41f3d662
|
@ -694,13 +694,16 @@ public class SmsDatabase extends MessageDatabase {
|
||||||
@NonNull Collection<UUID> peekJoinedUuids,
|
@NonNull Collection<UUID> peekJoinedUuids,
|
||||||
boolean isCallFull)
|
boolean isCallFull)
|
||||||
{
|
{
|
||||||
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
||||||
|
|
||||||
|
long threadId;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
db.beginTransaction();
|
db.beginTransaction();
|
||||||
|
|
||||||
Recipient recipient = Recipient.resolved(groupRecipientId);
|
Recipient recipient = Recipient.resolved(groupRecipientId);
|
||||||
long threadId = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(recipient);
|
|
||||||
|
threadId = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(recipient);
|
||||||
|
|
||||||
boolean peerEraIdSameAsPrevious = updatePreviousGroupCall(threadId, peekGroupCallEraId, peekJoinedUuids, isCallFull);
|
boolean peerEraIdSameAsPrevious = updatePreviousGroupCall(threadId, peekGroupCallEraId, peekJoinedUuids, isCallFull);
|
||||||
|
|
||||||
|
@ -736,13 +739,13 @@ public class SmsDatabase extends MessageDatabase {
|
||||||
|
|
||||||
DatabaseFactory.getThreadDatabase(context).update(threadId, true);
|
DatabaseFactory.getThreadDatabase(context).update(threadId, true);
|
||||||
|
|
||||||
notifyConversationListeners(threadId);
|
|
||||||
ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId));
|
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
} finally {
|
} finally {
|
||||||
db.endTransaction();
|
db.endTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notifyConversationListeners(threadId);
|
||||||
|
ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Ładowanie…
Reference in New Issue