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

Commit a328a7d0 authored by dev-12's avatar dev-12 Committed by dev-12
Browse files

refactor: rename `installationIssue` to `reportInstallationIssue`

parent 5cfc6d13
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ interface AppManager {
    fun moveOBBFilesToOBBDirectory(appInstall: AppInstall)
    fun getBaseApkPath(appInstall: AppInstall): String

    suspend fun installationIssue(appInstall: AppInstall)
    suspend fun reportInstallationIssue(appInstall: AppInstall)

    suspend fun updateAwaiting(appInstall: AppInstall)

+3 −3
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ class AppManagerImpl @Inject constructor(
                list.sort()

                if (list.isEmpty()) {
                    installationIssue(appInstall)
                    reportInstallationIssue(appInstall)
                    val errorMessage =
                        "installApp: error downloaded files doesn't exit for package ${appInstall.packageName} "
                    Timber.e(errorMessage)
@@ -150,7 +150,7 @@ class AppManagerImpl @Inject constructor(
                    Timber.i("installApp: ENDED ${appInstall.name} ${list.size}")
                } catch (e: Exception) {
                    Timber.i(">>> installApp app failed ")
                    installationIssue(appInstall)
                    reportInstallationIssue(appInstall)
                    throw e
                }
            }
@@ -279,7 +279,7 @@ class AppManagerImpl @Inject constructor(
    override fun getBaseApkPath(appInstall: AppInstall) =
        "$cacheDir/${appInstall.packageName}/${appInstall.packageName}_1.apk"

    override suspend fun installationIssue(appInstall: AppInstall) {
    override suspend fun reportInstallationIssue(appInstall: AppInstall) {
        appInstall.status = Status.INSTALLATION_ISSUE
        appInstallRepository.updateDownload(appInstall)
        flushOldDownload(appInstall.packageName)
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ class AppManagerWrapper @Inject constructor(
    }

    suspend fun installationIssue(appInstall: AppInstall) {
        return appManager.installationIssue(appInstall)
        return appManager.reportInstallationIssue(appInstall)
    }

    suspend fun updateAwaiting(appInstall: AppInstall) {
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ class FakeAppManager(private val appInstallDAO: AppInstallDAO) : AppManager {
        return "root/data/apps/${appInstall.packageName}/${appInstall.packageName}_1.apk"
    }

    override suspend fun installationIssue(appInstall: AppInstall) {
    override suspend fun reportInstallationIssue(appInstall: AppInstall) {
        TODO("Not yet implemented")
    }