File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
data/src/main/java/com/android/developers/androidify/data Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616package com.android.developers.androidify.data
1717
18+ import com.android.developers.androidify.RemoteConfigDataSource
1819import timber.log.Timber
1920import javax.inject.Inject
2021import javax.inject.Singleton
@@ -25,11 +26,15 @@ interface GeminiNanoGenerationDataSource {
2526}
2627
2728@Singleton
28- internal class GeminiNanoGenerationDataSourceImpl @Inject constructor(private val downloader : GeminiNanoDownloader ) :
29+ internal class GeminiNanoGenerationDataSourceImpl @Inject constructor(
30+ private val remoteConfigDataSource : RemoteConfigDataSource ,
31+ private val downloader : GeminiNanoDownloader ) :
2932 GeminiNanoGenerationDataSource {
3033
3134 override suspend fun initialize () {
32- downloader.downloadModel()
35+ if (remoteConfigDataSource.useGeminiNano()) {
36+ downloader.downloadModel()
37+ }
3338 }
3439
3540 /* *
You can’t perform that action at this time.
0 commit comments