mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Add internal setting to clear keep longer logs.
This commit is contained in:
@@ -8,6 +8,7 @@ import net.zetetic.database.sqlcipher.SQLiteDatabase
|
||||
import net.zetetic.database.sqlcipher.SQLiteOpenHelper
|
||||
import org.signal.core.util.CursorUtil
|
||||
import org.signal.core.util.SqlUtil
|
||||
import org.signal.core.util.delete
|
||||
import org.signal.core.util.getTableRowCount
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.crypto.DatabaseSecret
|
||||
@@ -218,6 +219,12 @@ class LogDatabase private constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun clearKeepLonger() {
|
||||
writableDatabase.delete(TABLE_NAME)
|
||||
.where("$KEEP_LONGER = ?", 1)
|
||||
.run()
|
||||
}
|
||||
|
||||
private fun buildValues(log: LogEntry): ContentValues {
|
||||
return ContentValues().apply {
|
||||
put(CREATED_AT, log.createdAt)
|
||||
|
||||
Reference in New Issue
Block a user