Skip to content

Commit

Permalink
Fix rebase onto develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aitorvs committed Dec 3, 2021
1 parent b1c848f commit 541e259
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import android.os.Bundle
import com.duckduckgo.app.browser.BrowserActivity
import com.duckduckgo.app.global.ActivityLifecycleCallbacks
import com.duckduckgo.browser.api.BrowserLifecycleObserver
import com.duckduckgo.di.scopes.AppObjectGraph
import com.duckduckgo.di.scopes.AppScope
import com.squareup.anvil.annotations.ContributesMultibinding
import dagger.SingleInstanceIn
import javax.inject.Inject
import javax.inject.Singleton

@ContributesMultibinding(AppObjectGraph::class)
@Singleton
@ContributesMultibinding(AppScope::class)
@SingleInstanceIn(AppScope::class)
class BrowserApplicationStateInfo @Inject constructor(
private val observers: Set<@JvmSuppressWildcards BrowserLifecycleObserver>
) : ActivityLifecycleCallbacks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import com.duckduckgo.app.settings.clear.ClearWhatOption
import com.duckduckgo.app.settings.clear.ClearWhenOption
import com.duckduckgo.app.settings.db.SettingsDataStore
import com.duckduckgo.browser.api.BrowserLifecycleObserver
import com.duckduckgo.di.scopes.AppObjectGraph
import com.duckduckgo.di.scopes.AppScope
import com.squareup.anvil.annotations.ContributesBinding
import com.squareup.anvil.annotations.ContributesMultibinding
import dagger.SingleInstanceIn
import kotlinx.coroutines.*
import timber.log.Timber
import java.util.concurrent.TimeUnit
import javax.inject.Inject
import javax.inject.Singleton
import kotlin.coroutines.CoroutineContext

interface DataClearer {
Expand All @@ -48,14 +48,14 @@ interface DataClearer {
}

@ContributesBinding(
scope = AppObjectGraph::class,
scope = AppScope::class,
boundType = DataClearer::class
)
@ContributesMultibinding(
scope = AppObjectGraph::class,
scope = AppScope::class,
boundType = BrowserLifecycleObserver::class
)
@Singleton
@SingleInstanceIn(AppScope::class)
class AutomaticDataClearer @Inject constructor(
private val workManager: WorkManager,
private val settingsDataStore: SettingsDataStore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import android.app.Activity
import android.app.Application
import android.os.Bundle
import com.duckduckgo.app.global.plugins.PluginPoint
import com.duckduckgo.di.scopes.AppObjectGraph
import com.duckduckgo.di.scopes.AppScope
import com.squareup.anvil.annotations.ContributesTo
import dagger.Module
import dagger.Provides
import javax.inject.Singleton
import dagger.SingleInstanceIn

interface ActivityLifecycleCallbacks : Application.ActivityLifecycleCallbacks {
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {}
Expand All @@ -51,10 +51,10 @@ private class ActivityLifecycleCallbacksPluginPoint(
}

@Module
@ContributesTo(AppObjectGraph::class)
@ContributesTo(AppScope::class)
class ActivityLifecycleCallbacksModule {
@Provides
@Singleton
@SingleInstanceIn(AppScope::class)
fun provideActivityLifecycleCallbacksPluginPoint(
plugins: Set<@JvmSuppressWildcards ActivityLifecycleCallbacks>
): PluginPoint<ActivityLifecycleCallbacks> = ActivityLifecycleCallbacksPluginPoint(plugins)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class DatabaseModule {
return RealPrivacyFeatureTogglesRepository(privacyFeatureTogglesDataStore)
}

@Singleton
@SingleInstanceIn(AppScope::class)
@Provides
fun provideDrmRepository(database: PrivacyConfigDatabase, @AppCoroutineScope coroutineScope: CoroutineScope, dispatcherProvider: DispatcherProvider): DrmRepository {
return RealDrmRepository(database, coroutineScope, dispatcherProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ import android.net.Uri
import android.webkit.PermissionRequest
import androidx.core.net.toUri
import com.duckduckgo.app.global.baseHost
import com.duckduckgo.di.scopes.AppObjectGraph
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.feature.toggles.api.FeatureToggle
import com.duckduckgo.privacy.config.api.Drm
import com.duckduckgo.privacy.config.api.PrivacyFeatureName
import com.duckduckgo.privacy.config.store.features.drm.DrmRepository
import com.squareup.anvil.annotations.ContributesBinding
import dagger.SingleInstanceIn
import javax.inject.Inject
import javax.inject.Singleton

@ContributesBinding(AppObjectGraph::class)
@Singleton
@ContributesBinding(AppScope::class)
@SingleInstanceIn(AppScope::class)
class RealDrm @Inject constructor(private val featureToggle: FeatureToggle, private val drmRepository: DrmRepository) : Drm {

override fun getDrmPermissionsForRequest(url: String, resources: Array<String>): Array<String> {
Expand Down

0 comments on commit 541e259

Please sign in to comment.