Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 17506e7d authored by Fahim M. Choudhury's avatar Fahim M. Choudhury
Browse files

refactor: remove unused AppInstallComponents class

parent 8a5f334e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
    <ID>LongParameterList:MainActivityViewModel.kt$MainActivityViewModel$( private val appLoungeDataStore: AppLoungeDataStore, private val applicationRepository: ApplicationRepository, private val appManagerWrapper: AppManagerWrapper, private val appLoungePackageManager: AppLoungePackageManager, private val pwaManager: PwaManager, private val blockedAppRepository: BlockedAppRepository, private val gPlayContentRatingRepository: GPlayContentRatingRepository, private val fDroidAntiFeatureRepository: FDroidAntiFeatureRepository, private val appInstallProcessor: AppInstallProcessor, private val systemAppsUpdatesRepository: SystemAppsUpdatesRepository, private val reportFaultyTokenUseCase: ReportFaultyTokenUseCase, )</ID>
    <ID>LongParameterList:UpdatesManagerImpl.kt$UpdatesManagerImpl$( @ApplicationContext private val context: Context, private val appLoungePackageManager: AppLoungePackageManager, private val applicationRepository: ApplicationRepository, private val faultyAppRepository: FaultyAppRepository, private val appLoungePreference: AppLoungePreference, private val fDroidRepository: FDroidRepository, private val blockedAppRepository: BlockedAppRepository, private val systemAppsUpdatesRepository: SystemAppsUpdatesRepository, )</ID>
    <ID>LongParameterList:UpdatesWorker.kt$UpdatesWorker$( @Assisted private val context: Context, @Assisted private val params: WorkerParameters, private val updatesManagerRepository: UpdatesManagerRepository, private val appLoungeDataStore: AppLoungeDataStore, private val authenticatorRepository: AuthenticatorRepository, private val appInstallProcessor: AppInstallProcessor, private val blockedAppRepository: BlockedAppRepository, private val systemAppsUpdatesRepository: SystemAppsUpdatesRepository, )</ID>
    <ID>NoUnusedImports:AppInstallComponents.kt$foundation.e.apps.data.install.AppInstallComponents.kt</ID>
    <ID>ProtectedMemberInFinalClass:ApplicationListFragment.kt$ApplicationListFragment$// protected to avoid SyntheticAccessor protected val args: ApplicationListFragmentArgs by navArgs()</ID>
    <ID>ProtectedMemberInFinalClass:ApplicationListFragment.kt$ApplicationListFragment$// protected to avoid SyntheticAccessor protected val viewModel: ApplicationListViewModel by viewModels()</ID>
    <ID>ProtectedMemberInFinalClass:GoogleSignInFragment.kt$GoogleSignInFragment$// protected to avoid SyntheticAccessor protected val viewModel: LoginViewModel by lazy { ViewModelProvider(requireActivity())[LoginViewModel::class.java] }</ID>
+0 −31
Original line number Diff line number Diff line
/*
 *  Copyright MURENA SAS 2024
 *  Apps  Quickly and easily install Android apps onto your device!
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */

package foundation.e.apps.data.install

import foundation.e.apps.data.install.AppInstallRepository
import foundation.e.apps.data.install.AppManagerWrapper
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class AppInstallComponents @Inject constructor(
    val appInstallRepository: AppInstallRepository,
    val appManagerWrapper: AppManagerWrapper
)
+3 −3
Original line number Diff line number Diff line
@@ -20,13 +20,13 @@ package foundation.e.apps.data.install.core

import foundation.e.apps.data.application.data.Application
import foundation.e.apps.data.enums.ResultStatus
import foundation.e.apps.data.install.AppInstallComponents
import foundation.e.apps.data.install.AppManagerWrapper
import foundation.e.apps.data.install.models.AppInstall
import foundation.e.apps.domain.model.install.Status
import javax.inject.Inject

class AppInstallationFacade @Inject constructor(
    private val appInstallComponents: AppInstallComponents,
    private val appManagerWrapper: AppManagerWrapper,
    private val installationEnqueuer: InstallationEnqueuer,
    private val installationProcessor: InstallationProcessor,
    private val installationRequest: InstallationRequest,
@@ -45,7 +45,7 @@ class AppInstallationFacade @Inject constructor(

        val isUpdate = isAnUpdate ||
            application.status == Status.UPDATABLE ||
            appInstallComponents.appManagerWrapper.isFusedDownloadInstalled(appInstall)
            appManagerWrapper.isFusedDownloadInstalled(appInstall)

        return enqueueFusedDownload(appInstall, isUpdate, application.isSystemApp)
    }
+4 −8
Original line number Diff line number Diff line
@@ -23,15 +23,13 @@ import foundation.e.apps.data.application.data.Application
import foundation.e.apps.data.enums.ResultStatus
import foundation.e.apps.data.enums.Source
import foundation.e.apps.data.enums.Type
import foundation.e.apps.domain.model.install.Status
import foundation.e.apps.data.install.AppInstallComponents
import foundation.e.apps.data.install.AppInstallRepository
import foundation.e.apps.data.install.AppManagerWrapper
import foundation.e.apps.data.install.models.AppInstall
import foundation.e.apps.data.install.core.AppInstallationFacade
import foundation.e.apps.data.install.core.InstallationRequest
import foundation.e.apps.data.install.core.InstallationEnqueuer
import foundation.e.apps.data.install.core.InstallationProcessor
import foundation.e.apps.data.install.core.InstallationRequest
import foundation.e.apps.data.install.models.AppInstall
import foundation.e.apps.domain.model.install.Status
import foundation.e.apps.util.MainCoroutineRule
import io.mockk.coEvery
import io.mockk.coVerify
@@ -62,14 +60,12 @@ class AppInstallationFacadeTest {
    @Before
    fun setup() {
        appManagerWrapper = mockk(relaxed = true)
        val appInstallRepository = mockk<AppInstallRepository>(relaxed = true)
        val appInstallComponents = AppInstallComponents(appInstallRepository, appManagerWrapper)
        installationRequest = mockk(relaxed = true)
        installationEnqueuer = mockk(relaxed = true)
        installationProcessor = mockk(relaxed = true)

        appInstallationFacade = AppInstallationFacade(
            appInstallComponents,
            appManagerWrapper,
            installationEnqueuer,
            installationProcessor,
            installationRequest