mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Clean up logging
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
package dev.octoshrimpy.quik.manager
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.squareup.moshi.Json
|
||||
import com.squareup.moshi.JsonClass
|
||||
import com.squareup.moshi.Moshi
|
||||
@@ -28,6 +27,7 @@ import dev.octoshrimpy.quik.common.util.extensions.versionCode
|
||||
import dev.octoshrimpy.quik.util.Preferences
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class ChangelogManagerImpl @Inject constructor(
|
||||
@@ -60,7 +60,7 @@ class ChangelogManagerImpl @Inject constructor(
|
||||
)
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e("ChangelogManager", "Error parsing changelog JSON", e)
|
||||
Timber.e(e, "Error parsing changelog JSON")
|
||||
ChangelogManager.CumulativeChangelog(emptyList(), emptyList(), emptyList(), emptyList())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ object QkTransaction {
|
||||
address, null, parts, sPI, dPI.ifEmpty { null }
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
Timber.e("send sms exception", e)
|
||||
Timber.e(e, "send sms exception")
|
||||
}
|
||||
|
||||
return true
|
||||
@@ -374,7 +374,7 @@ object QkTransaction {
|
||||
null, subscriptionId
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
Timber.e("failed to create mms message", e)
|
||||
Timber.e(e, "failed to create mms message")
|
||||
}
|
||||
|
||||
return Uri.EMPTY
|
||||
@@ -390,7 +390,7 @@ object QkTransaction {
|
||||
try {
|
||||
pdu = PduPersister.getPduPersister(context).load(messageUri)
|
||||
} catch (e: MmsException) {
|
||||
Timber.e("load pdu from provider failed", e)
|
||||
Timber.e(e, "load pdu from provider failed")
|
||||
return retVal
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ object QkTransaction {
|
||||
)
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
Timber.e("failed creating provider mms message", e)
|
||||
Timber.e(e, "failed creating provider mms message")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ object QkTransaction {
|
||||
val sendPdu = try {
|
||||
PduPersister.getPduPersister(context).load(messageUri)
|
||||
} catch (e: MmsException) {
|
||||
Timber.e("pdu from provider db failed", e)
|
||||
Timber.e(e, "pdu from provider db failed")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ object QkTransaction {
|
||||
.scheme(ContentResolver.SCHEME_CONTENT)
|
||||
.build()
|
||||
} catch (e: IOException) {
|
||||
Timber.e("error writing send file", e)
|
||||
Timber.e(e, "error writing send file")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ object QkTransaction {
|
||||
pendingIntent
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
Timber.e("failed sending mms", e)
|
||||
Timber.e(e, "failed sending mms")
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ class ReceiveMmsWorker(appContext: Context, workerParams: WorkerParameters)
|
||||
}
|
||||
Timber.v("notify send file $fileName")
|
||||
} catch (e: Exception) {
|
||||
Timber.e("error writing notify send file", e)
|
||||
Timber.e(e, "error writing notify send file")
|
||||
}
|
||||
|
||||
val useWapMmsc = com.android.mms.MmsConfig.getNotifyWapMMSC()
|
||||
@@ -318,7 +318,7 @@ class ReceiveMmsWorker(appContext: Context, workerParams: WorkerParameters)
|
||||
sendResponsePdu(context, subscriptionId, notificationInd.contentLocation, pdu)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Timber.e("error creating m-acknowledge.ind", e)
|
||||
Timber.e(e, "error creating m-acknowledge.ind")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ class ReceiveMmsWorker(appContext: Context, workerParams: WorkerParameters)
|
||||
sendResponsePdu(context, subscriptionId, notificationInd.contentLocation, pdu)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Timber.e("error creating m-notifyresp.ind", e)
|
||||
Timber.e(e, "error creating m-notifyresp.ind")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user