diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt index 68170b0f11..78c4886fef 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt @@ -32,7 +32,4 @@ sealed class VectorCallViewEvents : VectorViewEvents { object FailToTransfer : VectorCallViewEvents() object ShowScreenSharingPermissionDialog : VectorCallViewEvents() object StopScreenSharingService : VectorCallViewEvents() -// data class CallAnswered(val content: CallAnswerContent) : VectorCallViewEvents() -// data class CallHangup(val content: CallHangupContent) : VectorCallViewEvents() -// object CallAccepted : VectorCallViewEvents() } diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt index 7626e8178c..f1a4975751 100644 --- a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt @@ -31,12 +31,15 @@ class ScreenCaptureService : VectorService() { private val binder = LocalBinder() override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { - // Show a sticky notification + showStickyNotification() + + return START_STICKY + } + + private fun showStickyNotification() { val notificationId = System.currentTimeMillis().toInt() val notification = notificationUtils.buildScreenSharingNotification() startForeground(notificationId, notification) - - return START_STICKY } override fun onBind(intent: Intent?): IBinder {