Set visibility of interface implementations to internal

This commit is contained in:
MM20 2022-01-17 00:16:00 +01:00
parent a71efdf4b2
commit d85da0361d
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
14 changed files with 16 additions and 18 deletions

View File

@ -25,7 +25,7 @@ interface AppRepository {
fun getSuspendedPackages(): Flow<List<String>> fun getSuspendedPackages(): Flow<List<String>>
} }
class AppRepositoryImpl( internal class AppRepositoryImpl(
private val context: Context, private val context: Context,
hiddenItemsRepository: HiddenItemsRepository, hiddenItemsRepository: HiddenItemsRepository,
) : AppRepository { ) : AppRepository {

View File

@ -27,7 +27,7 @@ interface CalendarRepository {
suspend fun getCalendars(): List<UserCalendar> suspend fun getCalendars(): List<UserCalendar>
} }
class CalendarRepositoryImpl( internal class CalendarRepositoryImpl(
private val context: Context, private val context: Context,
hiddenItemsRepository: HiddenItemsRepository hiddenItemsRepository: HiddenItemsRepository
) : CalendarRepository, KoinComponent { ) : CalendarRepository, KoinComponent {

View File

@ -17,7 +17,7 @@ interface ContactRepository {
fun search(query: String): Flow<List<Contact>> fun search(query: String): Flow<List<Contact>>
} }
class ContactRepositoryImpl( internal class ContactRepositoryImpl(
private val context: Context, private val context: Context,
hiddenItemsRepository: HiddenItemsRepository hiddenItemsRepository: HiddenItemsRepository
) : ContactRepository, KoinComponent { ) : ContactRepository, KoinComponent {

View File

@ -31,7 +31,7 @@ interface FavoritesRepository {
fun getHiddenItems(): Flow<List<Searchable>> fun getHiddenItems(): Flow<List<Searchable>>
} }
class FavoritesRepositoryImpl( internal class FavoritesRepositoryImpl(
private val context: Context, private val context: Context,
private val database: AppDatabase private val database: AppDatabase
) : FavoritesRepository, KoinComponent { ) : FavoritesRepository, KoinComponent {

View File

@ -19,7 +19,7 @@ interface FileRepository {
suspend fun deleteFile(file: File) suspend fun deleteFile(file: File)
} }
class FileRepositoryImpl( internal class FileRepositoryImpl(
private val context: Context, private val context: Context,
hiddenItemsRepository: HiddenItemsRepository, hiddenItemsRepository: HiddenItemsRepository,
private val dataStore: LauncherDataStore private val dataStore: LauncherDataStore

View File

@ -4,7 +4,6 @@ import android.content.Context
import de.mm20.launcher2.files.R import de.mm20.launcher2.files.R
import de.mm20.launcher2.msservices.DriveItem import de.mm20.launcher2.msservices.DriveItem
import de.mm20.launcher2.msservices.MicrosoftGraphApiHelper import de.mm20.launcher2.msservices.MicrosoftGraphApiHelper
import de.mm20.launcher2.preferences.LauncherPreferences
import de.mm20.launcher2.search.data.File import de.mm20.launcher2.search.data.File
import de.mm20.launcher2.search.data.OneDriveFile import de.mm20.launcher2.search.data.OneDriveFile
@ -13,7 +12,8 @@ internal class OneDriveFileProvider(
) : FileProvider { ) : FileProvider {
override suspend fun search(query: String): List<File> { override suspend fun search(query: String): List<File> {
if (query.length < 4) return emptyList() if (query.length < 4) return emptyList()
val driveItems = MicrosoftGraphApiHelper.getInstance(context).queryOneDriveFiles(query) ?: return emptyList() val driveItems = MicrosoftGraphApiHelper.getInstance(context).queryOneDriveFiles(query)
?: return emptyList()
val files = mutableListOf<OneDriveFile>() val files = mutableListOf<OneDriveFile>()
for (driveItem in driveItems) { for (driveItem in driveItems) {
files += OneDriveFile( files += OneDriveFile(

View File

@ -1,9 +1,7 @@
package de.mm20.launcher2.files.providers package de.mm20.launcher2.files.providers
import de.mm20.launcher2.files.R import de.mm20.launcher2.files.R
import de.mm20.launcher2.helper.NetworkUtils
import de.mm20.launcher2.owncloud.OwncloudClient import de.mm20.launcher2.owncloud.OwncloudClient
import de.mm20.launcher2.preferences.LauncherPreferences
import de.mm20.launcher2.search.data.File import de.mm20.launcher2.search.data.File
import de.mm20.launcher2.search.data.OwncloudFile import de.mm20.launcher2.search.data.OwncloudFile

View File

@ -47,7 +47,7 @@ interface MusicRepository {
fun resetPlayer() fun resetPlayer()
} }
class MusicRepositoryImpl( internal class MusicRepositoryImpl(
private val context: Context, private val context: Context,
private val notificationRepository: NotificationRepository private val notificationRepository: NotificationRepository
) : MusicRepository, KoinComponent { ) : MusicRepository, KoinComponent {

View File

@ -55,7 +55,7 @@ enum class PermissionGroup {
Notifications, Notifications,
} }
class PermissionsManagerImpl( internal class PermissionsManagerImpl(
private val context: Context private val context: Context
) : PermissionsManager { ) : PermissionsManager {

View File

@ -17,7 +17,7 @@ interface WebsearchRepository {
fun deleteWebsearch(websearch: Websearch) fun deleteWebsearch(websearch: Websearch)
} }
class WebsearchRepositoryImpl( internal class WebsearchRepositoryImpl(
private val database: AppDatabase private val database: AppDatabase
) : WebsearchRepository, KoinComponent { ) : WebsearchRepository, KoinComponent {

View File

@ -16,7 +16,7 @@ interface UnitConverterRepository {
fun search(query:String): Flow<UnitConverter?> fun search(query:String): Flow<UnitConverter?>
} }
class UnitConverterRepositoryImpl(val context: Context) : UnitConverterRepository, KoinComponent { internal class UnitConverterRepositoryImpl(val context: Context) : UnitConverterRepository, KoinComponent {
private val dataStore: LauncherDataStore by inject() private val dataStore: LauncherDataStore by inject()
val unitConverter = MutableLiveData<UnitConverter?>() val unitConverter = MutableLiveData<UnitConverter?>()

View File

@ -43,7 +43,7 @@ interface WeatherRepository {
fun clearForecasts() fun clearForecasts()
} }
class WeatherRepositoryImpl( internal class WeatherRepositoryImpl(
private val context: Context, private val context: Context,
private val database: AppDatabase, private val database: AppDatabase,
private val dataStore: LauncherDataStore, private val dataStore: LauncherDataStore,

View File

@ -28,7 +28,7 @@ interface WebsiteRepository {
fun search(query: String): Flow<Website?> fun search(query: String): Flow<Website?>
} }
class WebsiteRepositoryImpl(val context: Context) : WebsiteRepository, KoinComponent { internal class WebsiteRepositoryImpl(val context: Context) : WebsiteRepository, KoinComponent {
private val dataStore: LauncherDataStore by inject() private val dataStore: LauncherDataStore by inject()

View File

@ -18,7 +18,7 @@ interface WikipediaRepository {
fun search(query: String): Flow<Wikipedia?> fun search(query: String): Flow<Wikipedia?>
} }
class WikipediaRepositoryImpl( internal class WikipediaRepositoryImpl(
private val context: Context private val context: Context
) : WikipediaRepository, KoinComponent { ) : WikipediaRepository, KoinComponent {