mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-25 05:27:42 +00:00
Clear old group rings on startup.
This commit is contained in:
@@ -211,6 +211,7 @@ public class ApplicationContext extends MultiDexApplication implements AppForegr
|
||||
.addPostRender(StoryOnboardingDownloadJob.Companion::enqueueIfNeeded)
|
||||
.addPostRender(PnpInitializeDevicesJob::enqueueIfNecessary)
|
||||
.addPostRender(() -> ApplicationDependencies.getExoPlayerPool().getPoolStats().getMaxUnreserved())
|
||||
.addPostRender(() -> SignalDatabase.groupCallRings().removeOldRings())
|
||||
.execute();
|
||||
|
||||
Log.d(TAG, "onCreate() took " + (System.currentTimeMillis() - startTime) + " ms");
|
||||
|
||||
@@ -79,6 +79,10 @@ class GroupCallRingTable(context: Context, databaseHelper: SignalDatabase) : Dat
|
||||
|
||||
db.delete(TABLE_NAME, "$DATE_RECEIVED < ?", SqlUtil.buildArgs(System.currentTimeMillis() - VALID_RING_DURATION))
|
||||
}
|
||||
|
||||
fun deleteAll() {
|
||||
databaseHelper.signalWritableDatabase.delete(TABLE_NAME, null, null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun CallManager.RingUpdate.toCode(): Int {
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.thoughtcrime.securesms.conversationlist.model.ConversationFilter
|
||||
import org.thoughtcrime.securesms.database.MessageTable.MarkedMessageInfo
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase.Companion.attachments
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase.Companion.drafts
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase.Companion.groupCallRings
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase.Companion.groupReceipts
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase.Companion.mentions
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase.Companion.messageLog
|
||||
@@ -1077,6 +1078,7 @@ class ThreadTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTa
|
||||
messageLog.deleteAll()
|
||||
messages.deleteAllThreads()
|
||||
drafts.clearAllDrafts()
|
||||
groupCallRings.deleteAll()
|
||||
db.delete(TABLE_NAME, null, null)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user