mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Upgrade Kotlin, AGP, Gradle versions and bring in kotlinx-serialization for use with navigation-compose.
This commit is contained in:
committed by
Greyson Parrelli
parent
957ddc82b5
commit
736811393f
@@ -5,13 +5,16 @@
|
||||
|
||||
package org.thoughtcrime.securesms.service
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
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.MainActivity
|
||||
@@ -111,6 +114,11 @@ class BackupProgressService : SafeForegroundService() {
|
||||
BackupProgressService.progress = progress
|
||||
BackupProgressService.indeterminate = indeterminate
|
||||
|
||||
if (ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.w(TAG, "Cannot update notification due to missing permission.")
|
||||
return@withLock
|
||||
}
|
||||
|
||||
if (NotificationManagerCompat.from(context).activeNotifications.any { n -> n.id == NotificationIds.BACKUP_PROGRESS }) {
|
||||
NotificationManagerCompat.from(context).notify(NotificationIds.BACKUP_PROGRESS, getForegroundNotification(context))
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
package org.thoughtcrime.securesms.service.webrtc
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Notification
|
||||
import android.app.PendingIntent
|
||||
import android.content.BroadcastReceiver
|
||||
@@ -177,6 +178,7 @@ class ActiveCallManager(
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
fun update(type: Int, recipientId: RecipientId, isVideoCall: Boolean) {
|
||||
Log.i(TAG, "update $type $recipientId $isVideoCall")
|
||||
previousNotificationDisposable.dispose()
|
||||
|
||||
Reference in New Issue
Block a user