Skip to content
Merged
Changes from all commits
Commits
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 @@ -15,6 +15,7 @@
*/
package com.android.developers.androidify.data

import com.android.developers.androidify.RemoteConfigDataSource
import timber.log.Timber
import javax.inject.Inject
import javax.inject.Singleton
Expand All @@ -25,11 +26,15 @@ interface GeminiNanoGenerationDataSource {
}

@Singleton
internal class GeminiNanoGenerationDataSourceImpl @Inject constructor(private val downloader: GeminiNanoDownloader) :
internal class GeminiNanoGenerationDataSourceImpl @Inject constructor(
private val remoteConfigDataSource: RemoteConfigDataSource,
private val downloader: GeminiNanoDownloader) :
GeminiNanoGenerationDataSource {

override suspend fun initialize() {
downloader.downloadModel()
if (remoteConfigDataSource.useGeminiNano()) {
downloader.downloadModel()
}
}

/**
Expand Down