Upgrade Kotlin, AGP, Gradle versions and bring in kotlinx-serialization for use with navigation-compose.

This commit is contained in:
Alex Hart
2025-09-17 12:41:18 -03:00
committed by Greyson Parrelli
parent 957ddc82b5
commit 736811393f
25 changed files with 1209 additions and 5 deletions

View File

@@ -5,12 +5,15 @@
package org.thoughtcrime.securesms.messages
import android.Manifest
import android.app.Notification
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import org.signal.core.util.PendingIntentFlags
import org.signal.core.util.logging.Log
import org.thoughtcrime.securesms.R
@@ -40,6 +43,11 @@ object GroupSendEndorsementInternalNotifier {
return
}
if (ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
Log.w(TAG, "maybePostGroupSendFallbackError: Notification permission is not granted.")
return
}
Log.internal().w(TAG, "Group send with GSE failed, GSE was likely out of date or incorrect", Throwable())
val now = System.currentTimeMillis().milliseconds
@@ -67,6 +75,11 @@ object GroupSendEndorsementInternalNotifier {
return
}
if (ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
Log.w(TAG, "maybePostMissingGroupSendEndorsement: Notification permission is not granted.")
return
}
Log.internal().w(TAG, "GSE missing for recipient", Throwable())
val now = System.currentTimeMillis().milliseconds

View File

@@ -1,11 +1,14 @@
package org.thoughtcrime.securesms.messages
import android.Manifest
import android.app.Notification
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import com.squareup.wire.internal.toUnmodifiableList
import org.signal.core.util.PendingIntentFlags
import org.signal.core.util.isAbsent
@@ -44,7 +47,6 @@ import org.thoughtcrime.securesms.jobs.PreKeysSyncJob
import org.thoughtcrime.securesms.jobs.SendRetryReceiptJob
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.logsubmit.SubmitDebugLogActivity
import org.thoughtcrime.securesms.messages.MessageDecryptor.FollowUpOperation
import org.thoughtcrime.securesms.messages.SignalServiceProtoUtil.hasGroupContext
import org.thoughtcrime.securesms.messages.protocol.BufferedProtocolStore
import org.thoughtcrime.securesms.notifications.NotificationChannels
@@ -430,6 +432,11 @@ object MessageDecryptor {
}
private fun postDecryptionErrorNotification(context: Context) {
if (ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
Log.w(TAG, "postDecryptionErrorNotification: Notification permission is not granted.")
return
}
val notification: Notification = NotificationCompat.Builder(context, NotificationChannels.getInstance().FAILURES)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle("[Internal-only] Failed to decrypt a message!")
@@ -441,6 +448,11 @@ object MessageDecryptor {
}
private fun postInvalidMessageNotification(context: Context, message: String) {
if (ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
Log.w(TAG, "postInvalidMessageNotification: Notification permission is not granted.")
return
}
val notification: Notification = NotificationCompat.Builder(context, NotificationChannels.getInstance().FAILURES)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle("[Internal-only] Received an invalid message!")