accessing the notification action ids via a dedicated class which builds upon the application id
This commit is contained in:
parent
9fe3fc69dd
commit
811b2e8c75
@ -31,6 +31,7 @@ import im.vector.app.core.network.WifiDetector
|
|||||||
import im.vector.app.core.pushers.model.PushData
|
import im.vector.app.core.pushers.model.PushData
|
||||||
import im.vector.app.core.services.GuardServiceStarter
|
import im.vector.app.core.services.GuardServiceStarter
|
||||||
import im.vector.app.features.notifications.NotifiableEventResolver
|
import im.vector.app.features.notifications.NotifiableEventResolver
|
||||||
|
import im.vector.app.features.notifications.NotificationActionIds
|
||||||
import im.vector.app.features.notifications.NotificationDrawerManager
|
import im.vector.app.features.notifications.NotificationDrawerManager
|
||||||
import im.vector.app.features.notifications.NotificationUtils
|
import im.vector.app.features.notifications.NotificationUtils
|
||||||
import im.vector.app.features.settings.BackgroundSyncMode
|
import im.vector.app.features.settings.BackgroundSyncMode
|
||||||
@ -68,6 +69,7 @@ class VectorMessagingReceiver : MessagingReceiver() {
|
|||||||
@Inject lateinit var unifiedPushHelper: UnifiedPushHelper
|
@Inject lateinit var unifiedPushHelper: UnifiedPushHelper
|
||||||
@Inject lateinit var unifiedPushStore: UnifiedPushStore
|
@Inject lateinit var unifiedPushStore: UnifiedPushStore
|
||||||
@Inject lateinit var pushParser: PushParser
|
@Inject lateinit var pushParser: PushParser
|
||||||
|
@Inject lateinit var actionIds: NotificationActionIds
|
||||||
|
|
||||||
private val coroutineScope = CoroutineScope(SupervisorJob())
|
private val coroutineScope = CoroutineScope(SupervisorJob())
|
||||||
|
|
||||||
@ -100,7 +102,7 @@ class VectorMessagingReceiver : MessagingReceiver() {
|
|||||||
|
|
||||||
// Diagnostic Push
|
// Diagnostic Push
|
||||||
if (pushData.eventId == PushersManager.TEST_EVENT_ID) {
|
if (pushData.eventId == PushersManager.TEST_EVENT_ID) {
|
||||||
val intent = Intent(NotificationUtils.PUSH_ACTION)
|
val intent = Intent(actionIds.PUSH_ACTION)
|
||||||
LocalBroadcastManager.getInstance(context).sendBroadcast(intent)
|
LocalBroadcastManager.getInstance(context).sendBroadcast(intent)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ fun openUri(activity: Activity, uri: String) {
|
|||||||
*/
|
*/
|
||||||
fun openMedia(activity: Activity, savedMediaPath: String, mimeType: String) {
|
fun openMedia(activity: Activity, savedMediaPath: String, mimeType: String) {
|
||||||
val file = File(savedMediaPath)
|
val file = File(savedMediaPath)
|
||||||
val uri = FileProvider.getUriForFile(activity, BuildConfig.APPLICATION_ID + ".fileProvider", file)
|
val uri = FileProvider.getUriForFile(activity, activity.packageName + ".fileProvider", file)
|
||||||
|
|
||||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||||
setDataAndType(uri, mimeType)
|
setDataAndType(uri, mimeType)
|
||||||
@ -214,7 +214,7 @@ fun openLocation(activity: Activity, latitude: Double, longitude: Double) {
|
|||||||
|
|
||||||
fun shareMedia(context: Context, file: File, mediaMimeType: String?) {
|
fun shareMedia(context: Context, file: File, mediaMimeType: String?) {
|
||||||
val mediaUri = try {
|
val mediaUri = try {
|
||||||
FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".fileProvider", file)
|
FileProvider.getUriForFile(context, context.packageName + ".fileProvider", file)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Timber.e(e, "onMediaAction Selected File cannot be shared")
|
Timber.e(e, "onMediaAction Selected File cannot be shared")
|
||||||
return
|
return
|
||||||
@ -376,7 +376,7 @@ private fun addToGallery(savedFile: File, mediaMimeType: String?, context: Conte
|
|||||||
/**
|
/**
|
||||||
* Open the play store to the provided application Id, default to this app.
|
* Open the play store to the provided application Id, default to this app.
|
||||||
*/
|
*/
|
||||||
fun openPlayStore(activity: Activity, appId: String = BuildConfig.APPLICATION_ID) {
|
fun openPlayStore(activity: Activity, appId: String) {
|
||||||
try {
|
try {
|
||||||
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$appId")))
|
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$appId")))
|
||||||
} catch (activityNotFoundException: ActivityNotFoundException) {
|
} catch (activityNotFoundException: ActivityNotFoundException) {
|
||||||
|
@ -48,31 +48,32 @@ class NotificationBroadcastReceiver : BroadcastReceiver() {
|
|||||||
@Inject lateinit var activeSessionHolder: ActiveSessionHolder
|
@Inject lateinit var activeSessionHolder: ActiveSessionHolder
|
||||||
@Inject lateinit var analyticsTracker: AnalyticsTracker
|
@Inject lateinit var analyticsTracker: AnalyticsTracker
|
||||||
@Inject lateinit var clock: Clock
|
@Inject lateinit var clock: Clock
|
||||||
|
@Inject lateinit var actionIds: NotificationActionIds
|
||||||
|
|
||||||
override fun onReceive(context: Context?, intent: Intent?) {
|
override fun onReceive(context: Context?, intent: Intent?) {
|
||||||
if (intent == null || context == null) return
|
if (intent == null || context == null) return
|
||||||
Timber.v("NotificationBroadcastReceiver received : $intent")
|
Timber.v("NotificationBroadcastReceiver received : $intent")
|
||||||
when (intent.action) {
|
when (intent.action) {
|
||||||
NotificationUtils.SMART_REPLY_ACTION ->
|
actionIds.SMART_REPLY_ACTION ->
|
||||||
handleSmartReply(intent, context)
|
handleSmartReply(intent, context)
|
||||||
NotificationUtils.DISMISS_ROOM_NOTIF_ACTION ->
|
actionIds.DISMISS_ROOM_NOTIF_ACTION ->
|
||||||
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
||||||
notificationDrawerManager.updateEvents { it.clearMessagesForRoom(roomId) }
|
notificationDrawerManager.updateEvents { it.clearMessagesForRoom(roomId) }
|
||||||
}
|
}
|
||||||
NotificationUtils.DISMISS_SUMMARY_ACTION ->
|
actionIds.DISMISS_SUMMARY_ACTION ->
|
||||||
notificationDrawerManager.clearAllEvents()
|
notificationDrawerManager.clearAllEvents()
|
||||||
NotificationUtils.MARK_ROOM_READ_ACTION ->
|
actionIds.MARK_ROOM_READ_ACTION ->
|
||||||
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
||||||
notificationDrawerManager.updateEvents { it.clearMessagesForRoom(roomId) }
|
notificationDrawerManager.updateEvents { it.clearMessagesForRoom(roomId) }
|
||||||
handleMarkAsRead(roomId)
|
handleMarkAsRead(roomId)
|
||||||
}
|
}
|
||||||
NotificationUtils.JOIN_ACTION -> {
|
actionIds.JOIN_ACTION -> {
|
||||||
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
||||||
notificationDrawerManager.updateEvents { it.clearMemberShipNotificationForRoom(roomId) }
|
notificationDrawerManager.updateEvents { it.clearMemberShipNotificationForRoom(roomId) }
|
||||||
handleJoinRoom(roomId)
|
handleJoinRoom(roomId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NotificationUtils.REJECT_ACTION -> {
|
actionIds.REJECT_ACTION -> {
|
||||||
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
intent.getStringExtra(KEY_ROOM_ID)?.let { roomId ->
|
||||||
notificationDrawerManager.updateEvents { it.clearMemberShipNotificationForRoom(roomId) }
|
notificationDrawerManager.updateEvents { it.clearMemberShipNotificationForRoom(roomId) }
|
||||||
handleRejectRoom(roomId)
|
handleRejectRoom(roomId)
|
||||||
|
@ -45,7 +45,6 @@ import androidx.core.content.getSystemService
|
|||||||
import androidx.core.content.res.ResourcesCompat
|
import androidx.core.content.res.ResourcesCompat
|
||||||
import androidx.core.graphics.drawable.IconCompat
|
import androidx.core.graphics.drawable.IconCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import im.vector.app.BuildConfig
|
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.core.extensions.createIgnoredUri
|
import im.vector.app.core.extensions.createIgnoredUri
|
||||||
import im.vector.app.core.platform.PendingIntentCompat
|
import im.vector.app.core.platform.PendingIntentCompat
|
||||||
@ -74,13 +73,30 @@ import kotlin.random.Random
|
|||||||
* Util class for creating notifications.
|
* Util class for creating notifications.
|
||||||
* Note: Cannot inject ColorProvider in the constructor, because it requires an Activity
|
* Note: Cannot inject ColorProvider in the constructor, because it requires an Activity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
data class NotificationActionIds @Inject constructor(
|
||||||
|
private val buildMeta: BuildMeta,
|
||||||
|
) {
|
||||||
|
|
||||||
|
val JOIN_ACTION = "${buildMeta.applicationId}.NotificationActions.JOIN_ACTION"
|
||||||
|
val REJECT_ACTION = "${buildMeta.applicationId}.NotificationActions.REJECT_ACTION"
|
||||||
|
val QUICK_LAUNCH_ACTION = "${buildMeta.applicationId}.NotificationActions.QUICK_LAUNCH_ACTION"
|
||||||
|
val MARK_ROOM_READ_ACTION = "${buildMeta.applicationId}.NotificationActions.MARK_ROOM_READ_ACTION"
|
||||||
|
val SMART_REPLY_ACTION = "${buildMeta.applicationId}.NotificationActions.SMART_REPLY_ACTION"
|
||||||
|
val DISMISS_SUMMARY_ACTION = "${buildMeta.applicationId}.NotificationActions.DISMISS_SUMMARY_ACTION"
|
||||||
|
val DISMISS_ROOM_NOTIF_ACTION = "${buildMeta.applicationId}.NotificationActions.DISMISS_ROOM_NOTIF_ACTION"
|
||||||
|
val TAP_TO_VIEW_ACTION = "${buildMeta.applicationId}.NotificationActions.TAP_TO_VIEW_ACTION"
|
||||||
|
val DIAGNOSTIC_ACTION = "${buildMeta.applicationId}.NotificationActions.DIAGNOSTIC"
|
||||||
|
val PUSH_ACTION = "${buildMeta.applicationId}.PUSH"
|
||||||
|
}
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class NotificationUtils @Inject constructor(
|
class NotificationUtils @Inject constructor(
|
||||||
private val context: Context,
|
private val context: Context,
|
||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val vectorPreferences: VectorPreferences,
|
private val vectorPreferences: VectorPreferences,
|
||||||
private val clock: Clock,
|
private val clock: Clock,
|
||||||
private val buildMeta: BuildMeta,
|
private val actionIds: NotificationActionIds,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@ -96,21 +112,6 @@ class NotificationUtils @Inject constructor(
|
|||||||
*/
|
*/
|
||||||
const val NOTIFICATION_ID_FOREGROUND_SERVICE = 61
|
const val NOTIFICATION_ID_FOREGROUND_SERVICE = 61
|
||||||
|
|
||||||
/* ==========================================================================================
|
|
||||||
* IDs for actions
|
|
||||||
* ========================================================================================== */
|
|
||||||
|
|
||||||
const val JOIN_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.JOIN_ACTION"
|
|
||||||
const val REJECT_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.REJECT_ACTION"
|
|
||||||
private const val QUICK_LAUNCH_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.QUICK_LAUNCH_ACTION"
|
|
||||||
const val MARK_ROOM_READ_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.MARK_ROOM_READ_ACTION"
|
|
||||||
const val SMART_REPLY_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.SMART_REPLY_ACTION"
|
|
||||||
const val DISMISS_SUMMARY_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.DISMISS_SUMMARY_ACTION"
|
|
||||||
const val DISMISS_ROOM_NOTIF_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.DISMISS_ROOM_NOTIF_ACTION"
|
|
||||||
const val TAP_TO_VIEW_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.TAP_TO_VIEW_ACTION"
|
|
||||||
const val DIAGNOSTIC_ACTION = "${BuildConfig.APPLICATION_ID}.NotificationActions.DIAGNOSTIC"
|
|
||||||
const val PUSH_ACTION = "${BuildConfig.APPLICATION_ID}.PUSH"
|
|
||||||
|
|
||||||
/* ==========================================================================================
|
/* ==========================================================================================
|
||||||
* IDs for channels
|
* IDs for channels
|
||||||
* ========================================================================================== */
|
* ========================================================================================== */
|
||||||
@ -653,7 +654,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
// Add actions and notification intents
|
// Add actions and notification intents
|
||||||
// Mark room as read
|
// Mark room as read
|
||||||
val markRoomReadIntent = Intent(context, NotificationBroadcastReceiver::class.java)
|
val markRoomReadIntent = Intent(context, NotificationBroadcastReceiver::class.java)
|
||||||
markRoomReadIntent.action = MARK_ROOM_READ_ACTION
|
markRoomReadIntent.action = actionIds.MARK_ROOM_READ_ACTION
|
||||||
markRoomReadIntent.data = createIgnoredUri(roomInfo.roomId)
|
markRoomReadIntent.data = createIgnoredUri(roomInfo.roomId)
|
||||||
markRoomReadIntent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomInfo.roomId)
|
markRoomReadIntent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomInfo.roomId)
|
||||||
val markRoomReadPendingIntent = PendingIntent.getBroadcast(
|
val markRoomReadPendingIntent = PendingIntent.getBroadcast(
|
||||||
@ -700,7 +701,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
|
|
||||||
val intent = Intent(context, NotificationBroadcastReceiver::class.java)
|
val intent = Intent(context, NotificationBroadcastReceiver::class.java)
|
||||||
intent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomInfo.roomId)
|
intent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomInfo.roomId)
|
||||||
intent.action = DISMISS_ROOM_NOTIF_ACTION
|
intent.action = actionIds.DISMISS_ROOM_NOTIF_ACTION
|
||||||
val pendingIntent = PendingIntent.getBroadcast(
|
val pendingIntent = PendingIntent.getBroadcast(
|
||||||
context.applicationContext,
|
context.applicationContext,
|
||||||
clock.epochMillis().toInt(),
|
clock.epochMillis().toInt(),
|
||||||
@ -735,7 +736,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
val roomId = inviteNotifiableEvent.roomId
|
val roomId = inviteNotifiableEvent.roomId
|
||||||
// offer to type a quick reject button
|
// offer to type a quick reject button
|
||||||
val rejectIntent = Intent(context, NotificationBroadcastReceiver::class.java)
|
val rejectIntent = Intent(context, NotificationBroadcastReceiver::class.java)
|
||||||
rejectIntent.action = REJECT_ACTION
|
rejectIntent.action = actionIds.REJECT_ACTION
|
||||||
rejectIntent.data = createIgnoredUri("$roomId&$matrixId")
|
rejectIntent.data = createIgnoredUri("$roomId&$matrixId")
|
||||||
rejectIntent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomId)
|
rejectIntent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomId)
|
||||||
val rejectIntentPendingIntent = PendingIntent.getBroadcast(
|
val rejectIntentPendingIntent = PendingIntent.getBroadcast(
|
||||||
@ -753,7 +754,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
|
|
||||||
// offer to type a quick accept button
|
// offer to type a quick accept button
|
||||||
val joinIntent = Intent(context, NotificationBroadcastReceiver::class.java)
|
val joinIntent = Intent(context, NotificationBroadcastReceiver::class.java)
|
||||||
joinIntent.action = JOIN_ACTION
|
joinIntent.action = actionIds.JOIN_ACTION
|
||||||
joinIntent.data = createIgnoredUri("$roomId&$matrixId")
|
joinIntent.data = createIgnoredUri("$roomId&$matrixId")
|
||||||
joinIntent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomId)
|
joinIntent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomId)
|
||||||
val joinIntentPendingIntent = PendingIntent.getBroadcast(
|
val joinIntentPendingIntent = PendingIntent.getBroadcast(
|
||||||
@ -836,7 +837,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
|
|
||||||
private fun buildOpenRoomIntent(roomId: String): PendingIntent? {
|
private fun buildOpenRoomIntent(roomId: String): PendingIntent? {
|
||||||
val roomIntentTap = RoomDetailActivity.newIntent(context, TimelineArgs(roomId = roomId, switchToParentSpace = true), true)
|
val roomIntentTap = RoomDetailActivity.newIntent(context, TimelineArgs(roomId = roomId, switchToParentSpace = true), true)
|
||||||
roomIntentTap.action = TAP_TO_VIEW_ACTION
|
roomIntentTap.action = actionIds.TAP_TO_VIEW_ACTION
|
||||||
// pending intent get reused by system, this will mess up the extra params, so put unique info to avoid that
|
// pending intent get reused by system, this will mess up the extra params, so put unique info to avoid that
|
||||||
roomIntentTap.data = createIgnoredUri("openRoom?$roomId")
|
roomIntentTap.data = createIgnoredUri("openRoom?$roomId")
|
||||||
|
|
||||||
@ -874,7 +875,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
val intent: Intent
|
val intent: Intent
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
intent = Intent(context, NotificationBroadcastReceiver::class.java)
|
intent = Intent(context, NotificationBroadcastReceiver::class.java)
|
||||||
intent.action = SMART_REPLY_ACTION
|
intent.action = actionIds.SMART_REPLY_ACTION
|
||||||
intent.data = createIgnoredUri(roomId)
|
intent.data = createIgnoredUri(roomId)
|
||||||
intent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomId)
|
intent.putExtra(NotificationBroadcastReceiver.KEY_ROOM_ID, roomId)
|
||||||
return PendingIntent.getBroadcast(
|
return PendingIntent.getBroadcast(
|
||||||
@ -950,7 +951,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
|
|
||||||
private fun getDismissSummaryPendingIntent(): PendingIntent {
|
private fun getDismissSummaryPendingIntent(): PendingIntent {
|
||||||
val intent = Intent(context, NotificationBroadcastReceiver::class.java)
|
val intent = Intent(context, NotificationBroadcastReceiver::class.java)
|
||||||
intent.action = DISMISS_SUMMARY_ACTION
|
intent.action = actionIds.DISMISS_SUMMARY_ACTION
|
||||||
intent.data = createIgnoredUri("deleteSummary")
|
intent.data = createIgnoredUri("deleteSummary")
|
||||||
return PendingIntent.getBroadcast(
|
return PendingIntent.getBroadcast(
|
||||||
context.applicationContext,
|
context.applicationContext,
|
||||||
@ -989,7 +990,7 @@ class NotificationUtils @Inject constructor(
|
|||||||
|
|
||||||
fun displayDiagnosticNotification() {
|
fun displayDiagnosticNotification() {
|
||||||
val testActionIntent = Intent(context, TestNotificationReceiver::class.java)
|
val testActionIntent = Intent(context, TestNotificationReceiver::class.java)
|
||||||
testActionIntent.action = DIAGNOSTIC_ACTION
|
testActionIntent.action = actionIds.DIAGNOSTIC_ACTION
|
||||||
val testPendingIntent = PendingIntent.getBroadcast(
|
val testPendingIntent = PendingIntent.getBroadcast(
|
||||||
context,
|
context,
|
||||||
0,
|
0,
|
||||||
|
@ -34,6 +34,7 @@ import im.vector.app.core.extensions.cleanup
|
|||||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||||
import im.vector.app.core.platform.VectorBaseFragment
|
import im.vector.app.core.platform.VectorBaseFragment
|
||||||
import im.vector.app.databinding.FragmentSettingsNotificationsTroubleshootBinding
|
import im.vector.app.databinding.FragmentSettingsNotificationsTroubleshootBinding
|
||||||
|
import im.vector.app.features.notifications.NotificationActionIds
|
||||||
import im.vector.app.features.notifications.NotificationUtils
|
import im.vector.app.features.notifications.NotificationUtils
|
||||||
import im.vector.app.features.rageshake.BugReporter
|
import im.vector.app.features.rageshake.BugReporter
|
||||||
import im.vector.app.features.settings.VectorSettingsFragmentInteractionListener
|
import im.vector.app.features.settings.VectorSettingsFragmentInteractionListener
|
||||||
@ -46,7 +47,8 @@ import javax.inject.Inject
|
|||||||
|
|
||||||
class VectorSettingsNotificationsTroubleshootFragment @Inject constructor(
|
class VectorSettingsNotificationsTroubleshootFragment @Inject constructor(
|
||||||
private val bugReporter: BugReporter,
|
private val bugReporter: BugReporter,
|
||||||
private val testManagerFactory: NotificationTroubleshootTestManagerFactory
|
private val testManagerFactory: NotificationTroubleshootTestManagerFactory,
|
||||||
|
private val actionIds: NotificationActionIds,
|
||||||
) : VectorBaseFragment<FragmentSettingsNotificationsTroubleshootBinding>() {
|
) : VectorBaseFragment<FragmentSettingsNotificationsTroubleshootBinding>() {
|
||||||
|
|
||||||
private var testManager: NotificationTroubleshootTestManager? = null
|
private var testManager: NotificationTroubleshootTestManager? = null
|
||||||
@ -151,11 +153,11 @@ class VectorSettingsNotificationsTroubleshootFragment @Inject constructor(
|
|||||||
|
|
||||||
tryOrNull("Unable to register the receiver") {
|
tryOrNull("Unable to register the receiver") {
|
||||||
LocalBroadcastManager.getInstance(requireContext())
|
LocalBroadcastManager.getInstance(requireContext())
|
||||||
.registerReceiver(broadcastReceiverPush, IntentFilter(NotificationUtils.PUSH_ACTION))
|
.registerReceiver(broadcastReceiverPush, IntentFilter(actionIds.PUSH_ACTION))
|
||||||
}
|
}
|
||||||
tryOrNull("Unable to register the receiver") {
|
tryOrNull("Unable to register the receiver") {
|
||||||
LocalBroadcastManager.getInstance(requireContext())
|
LocalBroadcastManager.getInstance(requireContext())
|
||||||
.registerReceiver(broadcastReceiverNotification, IntentFilter(NotificationUtils.DIAGNOSTIC_ACTION))
|
.registerReceiver(broadcastReceiverNotification, IntentFilter(actionIds.DIAGNOSTIC_ACTION))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user