@ -20,6 +20,7 @@ import androidx.core.content.getSystemService
import mozilla.components.concept.sync.Device
import mozilla.components.concept.sync.Device
import mozilla.components.concept.sync.TabData
import mozilla.components.concept.sync.TabData
import mozilla.components.support.base.log.logger.Logger
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.IntentReceiverActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.R
import org.mozilla.fenix.utils.IntentUtils
import org.mozilla.fenix.utils.IntentUtils
@ -60,8 +61,11 @@ class NotificationManager(private val context: Context) {
logger . debug ( " ${filteredTabs.size} tab(s) after filtering for unsupported schemes " )
logger . debug ( " ${filteredTabs.size} tab(s) after filtering for unsupported schemes " )
filteredTabs . forEach { tab ->
filteredTabs . forEach { tab ->
val showReceivedTabsIntentFlags = IntentUtils . defaultIntentPendingFlags or PendingIntent . FLAG _ONE _SHOT
val showReceivedTabsIntentFlags = IntentUtils . defaultIntentPendingFlags or PendingIntent . FLAG _ONE _SHOT
val intent = Intent ( Intent . ACTION _VIEW , Uri . parse ( tab . url ) )
val intent = Intent ( context , IntentReceiverActivity :: class . java ) . apply {
intent . flags = Intent . FLAG _ACTIVITY _NEW _TASK
action = Intent . ACTION _VIEW
data = Uri . parse ( tab . url )
flags = Intent . FLAG _ACTIVITY _NEW _TASK
}
intent . putExtra ( RECEIVE _TABS _TAG , true )
intent . putExtra ( RECEIVE _TABS _TAG , true )
val pendingIntent : PendingIntent =
val pendingIntent : PendingIntent =
PendingIntent . getActivity ( context , 0 , intent , showReceivedTabsIntentFlags )
PendingIntent . getActivity ( context , 0 , intent , showReceivedTabsIntentFlags )