mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-25 22:45:41 +03:00
Rename 'MagicFirebaseMessagingService'
Renamed the service to 'ChatAndCallMessagingService' to respect that the service handles chat messages and calls. Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
331309405d
commit
5b5db208ee
2 changed files with 7 additions and 5 deletions
|
@ -2,6 +2,8 @@
|
|||
~ Nextcloud Talk application
|
||||
~
|
||||
~ @author Mario Danic
|
||||
~ @author Tim Krüger
|
||||
~ Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
|
||||
~ Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
|
@ -38,7 +40,7 @@
|
|||
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
|
||||
|
||||
<service
|
||||
android:name=".services.firebase.MagicFirebaseMessagingService"
|
||||
android:name=".services.firebase.ChatAndCallMessagingService"
|
||||
android:exported="false"
|
||||
android:foregroundServiceType="phoneCall">
|
||||
<intent-filter>
|
||||
|
|
|
@ -81,7 +81,7 @@ import javax.inject.Inject
|
|||
|
||||
@SuppressLint("LongLogTag")
|
||||
@AutoInjector(NextcloudTalkApplication::class)
|
||||
class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
||||
class ChatAndCallMessagingService : FirebaseMessagingService() {
|
||||
@JvmField
|
||||
@Inject
|
||||
var appPreferences: AppPreferences? = null
|
||||
|
@ -215,7 +215,7 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
|||
|
||||
fullScreenIntent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
val fullScreenPendingIntent = PendingIntent.getActivity(
|
||||
this@MagicFirebaseMessagingService,
|
||||
this@ChatAndCallMessagingService,
|
||||
0,
|
||||
fullScreenIntent,
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
|
@ -231,7 +231,7 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
|||
val baseUrl = uri.host
|
||||
|
||||
val notification =
|
||||
NotificationCompat.Builder(this@MagicFirebaseMessagingService, notificationChannelId)
|
||||
NotificationCompat.Builder(this@ChatAndCallMessagingService, notificationChannelId)
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
.setCategory(NotificationCompat.CATEGORY_CALL)
|
||||
.setSmallIcon(R.drawable.ic_call_black_24dp)
|
||||
|
@ -333,7 +333,7 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() {
|
|||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "MagicFirebaseMessagingService"
|
||||
private val TAG = ChatAndCallMessagingService::class.simpleName
|
||||
private const val OBSERVABLE_COUNT = 12
|
||||
private const val OBSERVABLE_DELAY: Long = 5
|
||||
}
|
Loading…
Reference in a new issue