Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
932903a
added notification query to BrowserActivity
malmstein Feb 10, 2020
1904a97
Merge branch 'develop' into spike/david/sticky_search_notification
malmstein Feb 12, 2020
674a502
making notification silent
malmstein Feb 12, 2020
0dce32f
Merge branch 'develop' into spike/david/sticky_search_notification
malmstein Feb 26, 2020
012df97
adding new prompt notification
malmstein Feb 26, 2020
2f34416
Merge branch 'develop' into feature/david/sticky_search_notification
malmstein Mar 2, 2020
f7d490d
adding a new close button for all notification specs
malmstein Mar 2, 2020
143e549
adding new search notification as silent
malmstein Mar 2, 2020
ad7f9a8
we want to update the notification instead of adding a new one
malmstein Mar 2, 2020
d9e192f
adding buttons to the search prompt
malmstein Mar 2, 2020
83b434d
Merge branch 'develop' into feature/david/sticky_search_notification
malmstein Mar 2, 2020
b44cb8c
changing notification channel so it moves from the status bar to sile…
malmstein Mar 3, 2020
1c45dde
adjusting notification background
malmstein Mar 3, 2020
8d80ea9
added item to settings activity
malmstein Mar 3, 2020
3596192
enabling / disabling the notification from settings screen
malmstein Mar 3, 2020
08c22e2
no need to start the test notification here
malmstein Mar 3, 2020
d7881f9
moving to default priority, using the new interstitial search
malmstein Mar 5, 2020
2bab692
notification should not appear in the lock screen
malmstein Mar 6, 2020
fd407bb
fixed failing tests
malmstein Mar 6, 2020
3ef5f5e
search notification toggle should only be visible if experiment is en…
malmstein Mar 6, 2020
9f1ef05
added tests for viewModel
malmstein Mar 6, 2020
9437ca3
Merge branch 'develop' into feature/david/sticky_search_notification
malmstein Mar 6, 2020
4520eb0
Merge branch 'develop' into feature/david/sticky_search_notification
malmstein Mar 6, 2020
f25176f
proper design for the search prompt notification
malmstein Mar 9, 2020
82ad9e6
improved padding in the notification
malmstein Mar 9, 2020
b4da836
updated strings
malmstein Mar 10, 2020
e925b9e
remove Show from strings
malmstein Mar 10, 2020
0b6f60a
updated action buttons text for notification
malmstein Mar 11, 2020
6aac112
updated pixel names for the feature
malmstein Mar 11, 2020
997257c
added new pixels and improved ui of initial notification
malmstein Mar 11, 2020
ed570f5
better padding
malmstein Mar 11, 2020
f391a41
updated background and padding for both notifications
malmstein Mar 11, 2020
fc510ec
using proper text title style for sticky notification
malmstein Mar 11, 2020
6c9b20f
Merge branch 'develop' into feature/david/sticky_search_notification
malmstein Mar 11, 2020
82a89c3
added missing tests for notification scheduler
malmstein Mar 12, 2020
96b40ff
added comments on VariantManager
malmstein Mar 12, 2020
bc5e155
updated variants to latest definition
malmstein Mar 12, 2020
b9fcfdd
cleaning up the notification layout now that we don't need text
malmstein Mar 13, 2020
508c74f
Revert "cleaning up the notification layout now that we don't need text"
malmstein Mar 13, 2020
add9906
cleaning up the layouts here
malmstein Mar 13, 2020
61b226e
ensure we don't schedule or show the notification setting if the vari…
malmstein Mar 13, 2020
8774c6c
proper notification variant keys
malmstein Mar 13, 2020
0f7ac4e
good thing we had a test for this!
malmstein Mar 13, 2020
cd2344c
typo in test names
malmstein Mar 16, 2020
522af65
no need to extend the open class when it's only done once
malmstein Mar 16, 2020
0020de9
previous experiment already has it's sample size
malmstein Mar 16, 2020
a1ac5eb
xml formatting
malmstein Mar 16, 2020
295538d
better naming for methods that create an Intent
malmstein Mar 16, 2020
6e47ad9
merging issue, get rid of it
malmstein Mar 16, 2020
81a384c
code formatting
malmstein Mar 16, 2020
009de05
better method naming
malmstein Mar 16, 2020
8b04005
these values are not used and should not be hardcoded
malmstein Mar 16, 2020
751af30
ensure both active and inactive user notifications are scheduled as e…
malmstein Mar 16, 2020
87431ca
clean up layout, we don't need the framelayout here
malmstein Mar 16, 2020
9855ab0
remove unused imports
malmstein Mar 16, 2020
bcfa68d
extracting methods to its own constructor
malmstein Mar 16, 2020
1b7c39c
this notification should use the same channel
malmstein Mar 16, 2020
c9a0aa6
changed notification channel to search an importance high so we alway…
malmstein Mar 16, 2020
cf078fa
added proper icons to add / remove
malmstein Mar 16, 2020
43b66e3
fixing tests with proper values
malmstein Mar 16, 2020
a575823
we now send pixels to see engagement with notification from settings
malmstein Mar 16, 2020
0df3fcb
cleaning up notification priorities
malmstein Mar 16, 2020
cb19bce
added empty drawable for better documentation
malmstein Mar 16, 2020
7217661
better naming and proper empty drawable
malmstein Mar 16, 2020
8ec320f
serp experiments are now inactive
malmstein Mar 16, 2020
d5df026
Merge branch 'develop' into feature/david/sticky_search_notification
malmstein Mar 16, 2020
7c23dee
better name for the test
malmstein Mar 16, 2020
49a5a1c
Merge branch 'develop' into feature/david/sticky_search_notification
malmstein Mar 17, 2020
24d7b51
fixing merge issue
malmstein Mar 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/


@file:Suppress("RemoveExplicitTypeArguments")

package com.duckduckgo.app.notification
Expand All @@ -23,16 +22,17 @@ import androidx.test.platform.app.InstrumentationRegistry
import androidx.work.WorkInfo
import androidx.work.WorkManager
import com.duckduckgo.app.CoroutineTestRule
import com.duckduckgo.app.notification.NotificationScheduler.ClearDataNotificationWorker
import com.duckduckgo.app.notification.NotificationScheduler.PrivacyNotificationWorker
import com.duckduckgo.app.notification.AndroidNotificationScheduler.*
import com.duckduckgo.app.notification.model.SchedulableNotification
import com.duckduckgo.app.notification.model.SearchNotification
import com.duckduckgo.app.statistics.VariantManager
import com.duckduckgo.app.statistics.VariantManager.Companion.DEFAULT_VARIANT
import com.nhaarman.mockitokotlin2.any
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import org.junit.After
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Rule
Expand All @@ -48,6 +48,7 @@ class NotificationSchedulerTest {
private val variantManager: VariantManager = mock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how we covered many test scenarios here 💯

I wonder if it's necessary to test what happens if we call twice scheduleNextNotification, changing between calls which notification will appear.
The motivation behind this is to test (if necessary) cancelation and scheduling a new notification having a previous one. Is that a possible case to cover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scheduleNextNotification is something that happens once each time the app is opened, so it's the Application class responsibility to call this method. I don't think it's the Scheduler's responsibility to test this scenario. Ideally I'd like to rethink how we schedule notifications, being GlobalScope.launch() and all... but that's another story

private val clearNotification: SchedulableNotification = mock()
private val privacyNotification: SchedulableNotification = mock()
private val searchPromptNotification: SearchNotification = mock()

private val context = InstrumentationRegistry.getInstrumentation().targetContext
private var workManager = WorkManager.getInstance(context)
Expand All @@ -56,56 +57,137 @@ class NotificationSchedulerTest {
@Before
fun before() {
whenever(variantManager.getVariant(any())).thenReturn(DEFAULT_VARIANT)
testee = NotificationScheduler(
testee = AndroidNotificationScheduler(
workManager,
clearNotification,
privacyNotification
privacyNotification,
searchPromptNotification
)
}

@After
fun resetWorkers() {
workManager.cancelAllWorkByTag(AndroidNotificationScheduler.CONTINUOUS_APP_USE_REQUEST_TAG)
}

@Test
fun whenPrivacyNotificationClearDataAndSearchPromptCanShowThenBothAreScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(true)
whenever(clearNotification.canShow()).thenReturn(true)
whenever(searchPromptNotification.canShow()).thenReturn(true)
testee.scheduleNextNotification()

assertUnusedAppNotificationScheduled(PrivacyNotificationWorker::class.jvmName)
assertContinuousAppUseNotificationScheduled(SearchPromptNotificationWorker::class.jvmName)
}

@Test
fun whenBothPrivacyNotificationAndCleatDataCanShowThenPrivacyNotificationScheduled() = runBlocking<Unit> {
fun whenPrivacyNotificationClearDataAndSearchPromptCanShowThenPrivacyNotificationScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(true)
whenever(clearNotification.canShow()).thenReturn(true)
whenever(searchPromptNotification.canShow()).thenReturn(false)
testee.scheduleNextNotification()
assertNotificationScheduled(PrivacyNotificationWorker::class.jvmName)

assertUnusedAppNotificationScheduled(PrivacyNotificationWorker::class.jvmName)
assertNoContinuousAppNotificationScheduled()
}

@Test
fun whenPrivacyNotificationCanShowAndCleatDataCannotThenPrivacyNotificationScheduled() = runBlocking<Unit> {
fun whenPrivacyNotificationAndSearchPromptCanShowButClearDataCannotThenThenBothAreScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(true)
whenever(clearNotification.canShow()).thenReturn(false)
whenever(searchPromptNotification.canShow()).thenReturn(true)
testee.scheduleNextNotification()
assertNotificationScheduled(PrivacyNotificationWorker::class.jvmName)

assertUnusedAppNotificationScheduled(PrivacyNotificationWorker::class.jvmName)
assertContinuousAppUseNotificationScheduled(SearchPromptNotificationWorker::class.jvmName)
}

@Test
fun whenPrivacyNotificationCannotShowAndClearNotificationCanShowThenNotificationScheduled() = runBlocking<Unit> {
fun whenPrivacyNotificationCanShowButClearDataAndSearchPromptCannotThenPrivacyNotificationScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(true)
whenever(clearNotification.canShow()).thenReturn(false)
whenever(searchPromptNotification.canShow()).thenReturn(false)
testee.scheduleNextNotification()

assertUnusedAppNotificationScheduled(PrivacyNotificationWorker::class.jvmName)
assertNoContinuousAppNotificationScheduled()
}

@Test
fun whenPrivacyNotificationAndSearchPromptCannotShowAndClearNotificationCanShowThenBothAreScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(false)
whenever(clearNotification.canShow()).thenReturn(true)
whenever(searchPromptNotification.canShow()).thenReturn(true)
testee.scheduleNextNotification()

assertUnusedAppNotificationScheduled(ClearDataNotificationWorker::class.jvmName)
assertContinuousAppUseNotificationScheduled(SearchPromptNotificationWorker::class.jvmName)
}

@Test
fun whenPrivacyNotificationAndClearNotificationCannotShowButSearchPromptCanShowThenNotificationScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(false)
whenever(clearNotification.canShow()).thenReturn(false)
whenever(searchPromptNotification.canShow()).thenReturn(true)
testee.scheduleNextNotification()

assertContinuousAppUseNotificationScheduled(SearchPromptNotificationWorker::class.jvmName)
assertNoUnusedAppNotificationScheduled()
}

@Test
fun whenPrivacyNotificationAndClearNotificationCannotShowButSearchPromptCanThenSearchPromptNotificationScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(false)
whenever(clearNotification.canShow()).thenReturn(false)
whenever(searchPromptNotification.canShow()).thenReturn(true)
testee.scheduleNextNotification()
assertNotificationScheduled(ClearDataNotificationWorker::class.jvmName)

assertContinuousAppUseNotificationScheduled(SearchPromptNotificationWorker::class.jvmName)
assertNoUnusedAppNotificationScheduled()
}

@Test
fun whenNoNotificationCanShowThenNoNotificationScheduled() = runBlocking<Unit> {
whenever(privacyNotification.canShow()).thenReturn(false)
whenever(clearNotification.canShow()).thenReturn(false)
whenever(searchPromptNotification.canShow()).thenReturn(false)
testee.scheduleNextNotification()

assertNoNotificationScheduled()
}

private fun assertNotificationScheduled(workerName: String) {
assertTrue(getScheduledWorkers().any { it.tags.contains(workerName) })
private fun assertUnusedAppNotificationScheduled(workerName: String) {
assertTrue(getUnusedAppScheduledWorkers().any { it.tags.contains(workerName) })
}

private fun assertContinuousAppUseNotificationScheduled(workerName: String) {
assertTrue(getContinuousAppUseScheduledWorkers().any { it.tags.contains(workerName) })
}

private fun assertNoUnusedAppNotificationScheduled() {
assertTrue(getUnusedAppScheduledWorkers().isEmpty())
}

private fun assertNoContinuousAppNotificationScheduled() {
assertTrue(getContinuousAppUseScheduledWorkers().isEmpty())
}

private fun assertNoNotificationScheduled() {
assertTrue(getScheduledWorkers().isEmpty())
assertTrue(getUnusedAppScheduledWorkers().isEmpty())
assertTrue(getContinuousAppUseScheduledWorkers().isEmpty())
}

private fun getUnusedAppScheduledWorkers(): List<WorkInfo> {
return workManager
.getWorkInfosByTag(AndroidNotificationScheduler.UNUSED_APP_WORK_REQUEST_TAG)
.get()
.filter { it.state == WorkInfo.State.ENQUEUED }
}

private fun getScheduledWorkers(): List<WorkInfo> {
private fun getContinuousAppUseScheduledWorkers(): List<WorkInfo> {
return workManager
.getWorkInfosByTag(NotificationScheduler.WORK_REQUEST_TAG)
.getWorkInfosByTag(AndroidNotificationScheduler.CONTINUOUS_APP_USE_REQUEST_TAG)
.get()
.filter { it.state == WorkInfo.State.ENQUEUED }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@ import com.duckduckgo.app.browser.BuildConfig
import com.duckduckgo.app.browser.defaultbrowsing.DefaultBrowserDetector
import com.duckduckgo.app.global.DuckDuckGoTheme
import com.duckduckgo.app.icon.api.AppIcon
import com.duckduckgo.app.notification.NotificationScheduler
import com.duckduckgo.app.settings.SettingsViewModel.Command
import com.duckduckgo.app.settings.clear.ClearWhatOption.CLEAR_NONE
import com.duckduckgo.app.settings.clear.ClearWhenOption.APP_EXIT_ONLY
import com.duckduckgo.app.settings.db.SettingsDataStore
import com.duckduckgo.app.statistics.Variant
import com.duckduckgo.app.statistics.VariantManager
import com.duckduckgo.app.statistics.pixels.Pixel
import com.nhaarman.mockitokotlin2.*
import com.nhaarman.mockitokotlin2.KArgumentCaptor
import com.nhaarman.mockitokotlin2.argumentCaptor
import com.nhaarman.mockitokotlin2.atLeastOnce
import com.nhaarman.mockitokotlin2.verify
import com.nhaarman.mockitokotlin2.whenever
import org.junit.Assert.*
import org.junit.Before
import org.junit.Rule
Expand Down Expand Up @@ -62,6 +67,9 @@ class SettingsViewModelTest {
@Mock
private lateinit var mockVariantManager: VariantManager

@Mock
private lateinit var notificationScheduler: NotificationScheduler

@Mock
private lateinit var mockPixel: Pixel

Expand All @@ -74,7 +82,7 @@ class SettingsViewModelTest {
context = InstrumentationRegistry.getInstrumentation().targetContext
commandCaptor = argumentCaptor()

testee = SettingsViewModel(mockAppSettingsDataStore, mockDefaultBrowserDetector, mockVariantManager, mockPixel)
testee = SettingsViewModel(mockAppSettingsDataStore, mockDefaultBrowserDetector, mockVariantManager, mockPixel, notificationScheduler)
testee.command.observeForever(commandObserver)

whenever(mockAppSettingsDataStore.automaticallyClearWhenOption).thenReturn(APP_EXIT_ONLY)
Expand Down Expand Up @@ -222,5 +230,32 @@ class SettingsViewModelTest {
assertEquals(Command.LaunchAppIcon, commandCaptor.firstValue)
}

@Test
fun whenSearchNotificationWasPreviouslyEnabledThenViewStateIndicatesIt() {
whenever(mockAppSettingsDataStore.searchNotificationEnabled).thenReturn(true)
testee.start()
assertTrue(latestViewState().searchNotificationEnabled)
}

@Test
fun whenSearchNotificationToggledOnThenDataStoreIsUpdatedAndNotificationShown() {
testee.onSearchNotificationSettingChanged(true)
verify(mockAppSettingsDataStore).searchNotificationEnabled = true
verify(notificationScheduler).launchStickySearchNotification()
verify(mockPixel).fire(Pixel.PixelName.QUICK_SEARCH_NOTIFICATION_ENABLED)

assertTrue(latestViewState().searchNotificationEnabled)
}

@Test
fun whenSearchNotificationToggledOffThenDataStoreIsUpdatedAndNotificationRemoved() {
testee.onSearchNotificationSettingChanged(false)
verify(mockAppSettingsDataStore).searchNotificationEnabled = false
verify(notificationScheduler).dismissStickySearchNotification()
verify(mockPixel).fire(Pixel.PixelName.QUICK_SEARCH_NOTIFICATION_DISABLED)

assertFalse(latestViewState().searchNotificationEnabled)
}

private fun latestViewState() = testee.viewState.value!!
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.duckduckgo.app.statistics

import com.duckduckgo.app.statistics.VariantManager.Companion.DEFAULT_VARIANT
import com.duckduckgo.app.statistics.VariantManager.Companion.RESERVED_EU_AUCTION_VARIANT
import com.duckduckgo.app.statistics.VariantManager.VariantFeature.*
import org.junit.Assert.*
import org.junit.Test
Expand All @@ -33,14 +32,14 @@ class VariantManagerTest {
@Test
fun serpControlVariantIsInactiveAndHasNoFeatures() {
val variant = variants.first { it.key == "sc" }
assertEqualsDouble(1.0, variant.weight)
assertEqualsDouble(0.0, variant.weight)
assertEquals(0, variant.features.size)
}

@Test
fun serpExperimentalVariantIsInactiveAndHasNoFeatures() {
val variant = variants.first { it.key == "se" }
assertEqualsDouble(1.0, variant.weight)
assertEqualsDouble(0.0, variant.weight)
assertEquals(0, variant.features.size)
}

Expand Down Expand Up @@ -75,18 +74,18 @@ class VariantManagerTest {
// CTA on Concept Test experiments

@Test
fun insertCtaConceptTestControlVariantIsActiveAndHasConceptTestAndHasExpectedFeatures() {
fun insertCtaConceptTestControlVariantIsInactiveAndHasConceptTestAndHasExpectedFeatures() {
val variant = variants.first { it.key == "mj" }
assertEqualsDouble(1.0, variant.weight)
assertEqualsDouble(0.0, variant.weight)
assertEquals(2, variant.features.size)
assertTrue(variant.hasFeature(ConceptTest))
assertTrue(variant.hasFeature(SuppressOnboardingDefaultBrowserContinueScreen))
}

@Test
fun insertCtaConceptTestWithCtasAsDaxDialogsExperimentalVariantIsActiveAndHasExpectedFeatures() {
fun insertCtaConceptTestWithCtasAsDaxDialogsExperimentalVariantIsInactiveAndHasExpectedFeatures() {
val variant = variants.first { it.key == "mh" }
assertEqualsDouble(1.0, variant.weight)
assertEqualsDouble(0.0, variant.weight)
assertEquals(5, variant.features.size)
assertTrue(variant.hasFeature(ConceptTest))
assertTrue(variant.hasFeature(SuppressHomeTabWidgetCta))
Expand All @@ -95,6 +94,23 @@ class VariantManagerTest {
assertTrue(variant.hasFeature(SearchWidgetDaxCta))
}

// Search Notification Experiment

@Test
fun searchNotificationControlVariantIsActiveAndHasNoFeatures() {
val variant = variants.first { it.key == "mf" }
assertEqualsDouble(1.0, variant.weight)
assertEquals(0, variant.features.size)
}

@Test
fun searchNotificationVariantIsActiveAndHasStickySearchNotificationFeature() {
val variant = variants.first { it.key == "mg" }
assertEqualsDouble(1.0, variant.weight)
assertEquals(1, variant.features.size)
assertTrue(variant.hasFeature(StickySearchNotification))
}

@Test
fun verifyNoDuplicateVariantNames() {
val existingNames = mutableSetOf<String>()
Expand Down
31 changes: 29 additions & 2 deletions app/src/main/java/com/duckduckgo/app/di/DaggerWorkerFactory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ import androidx.work.WorkerFactory
import androidx.work.WorkerParameters
import com.duckduckgo.app.fire.DataClearingWorker
import com.duckduckgo.app.global.view.ClearDataAction
import com.duckduckgo.app.notification.AndroidNotificationScheduler.*
import com.duckduckgo.app.notification.NotificationFactory
import com.duckduckgo.app.notification.NotificationScheduler.ClearDataNotificationWorker
import com.duckduckgo.app.notification.NotificationScheduler.PrivacyNotificationWorker
import com.duckduckgo.app.notification.db.NotificationDao
import com.duckduckgo.app.notification.model.ClearDataNotification
import com.duckduckgo.app.notification.model.PrivacyProtectionNotification
import com.duckduckgo.app.notification.model.SearchPromptNotification
import com.duckduckgo.app.notification.model.StickySearchNotification
import com.duckduckgo.app.settings.db.SettingsDataStore
import com.duckduckgo.app.statistics.api.OfflinePixelScheduler
import com.duckduckgo.app.statistics.api.OfflinePixelSender
Expand All @@ -44,6 +45,8 @@ class DaggerWorkerFactory(
private val notificationFactory: NotificationFactory,
private val clearDataNotification: ClearDataNotification,
private val privacyProtectionNotification: PrivacyProtectionNotification,
private val stickySearchPromptNotification: SearchPromptNotification,
private val stickySearchNotification: StickySearchNotification,
private val pixel: Pixel
) : WorkerFactory() {

Expand All @@ -58,6 +61,9 @@ class DaggerWorkerFactory(
is DataClearingWorker -> injectDataClearWorker(instance)
is ClearDataNotificationWorker -> injectClearDataNotificationWorker(instance)
is PrivacyNotificationWorker -> injectPrivacyNotificationWorker(instance)
is SearchPromptNotificationWorker -> injectSearchPromptNotificationWorker(instance)
is StickySearchNotificationWorker -> injectStickySearchNotificationWorker(instance)
is DismissSearchNotificationWorker -> injectDismissSearchNotificationWorker(instance)
else -> Timber.i("No injection required for worker $workerClassName")
}

Expand Down Expand Up @@ -89,4 +95,25 @@ class DaggerWorkerFactory(
worker.notification = privacyProtectionNotification
}

private fun injectSearchPromptNotificationWorker(worker: SearchPromptNotificationWorker) {
worker.manager = notificationManager
worker.notificationDao = notificationDao
worker.factory = notificationFactory
worker.pixel = pixel
worker.notification = stickySearchPromptNotification
}

private fun injectStickySearchNotificationWorker(worker: StickySearchNotificationWorker) {
worker.manager = notificationManager
worker.notificationDao = notificationDao
worker.factory = notificationFactory
worker.pixel = pixel
worker.notification = stickySearchNotification
}

private fun injectDismissSearchNotificationWorker(worker: DismissSearchNotificationWorker) {
worker.manager = notificationManager
worker.notificationDao = notificationDao
worker.notification = stickySearchNotification
}
}
Loading