Merge pull request #752 from naveensingh/fix_751_crash

Reset database on next app update
This commit is contained in:
Tibor Kaputa 2023-09-20 09:06:58 +02:00 committed by GitHub
commit c1841a8a11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 4 deletions

View File

@ -6,7 +6,6 @@ plugins {
alias(libs.plugins.android)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.parcelize)
alias(libs.plugins.ksp)
base
}

View File

@ -28,3 +28,8 @@
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}
# Gson
-keep class com.simplemobiletools.commons.models.SimpleContact { *; }
-keep class com.simplemobiletools.smsmessenger.models.Attachment { *; }
-keep class com.simplemobiletools.smsmessenger.models.MessageAttachment { *; }

View File

@ -988,6 +988,7 @@ fun Context.getFileSizeFromUri(uri: Uri): Long {
// fix a glitch at enabling Release version minifying from 5.12.3
// reset messages in 5.14.3 again, as PhoneNumber is no longer minified
// reset messages in 5.19.1 again, as SimpleContact is no longer minified
fun Context.clearAllMessagesIfNeeded() {
if (!config.wasDbCleared) {
ensureBackgroundThread {

View File

@ -34,7 +34,7 @@ const val XML_MIME_TYPE = "text/xml"
const val TXT_MIME_TYPE = "text/plain"
const val IMPORT_SMS = "import_sms"
const val IMPORT_MMS = "import_mms"
const val WAS_DB_CLEARED = "was_db_cleared_2"
const val WAS_DB_CLEARED = "was_db_cleared_3"
const val EXTRA_VCARD_URI = "vcard"
const val SCHEDULED_MESSAGE_ID = "scheduled_message_id"
const val SOFT_KEYBOARD_HEIGHT = "soft_keyboard_height"

View File

@ -1,7 +1,6 @@
plugins {
alias(libs.plugins.android).apply(false)
alias(libs.plugins.kotlinAndroid).apply(false)
alias(libs.plugins.parcelize).apply(false)
alias(libs.plugins.kotlinSerialization).apply(false)
alias(libs.plugins.ksp).apply(false)
}

View File

@ -60,5 +60,4 @@ room = [
android = { id = "com.android.application", version.ref = "gradlePlugins-agp" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }