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

Commit 2d706532 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

update how system app information is obtained

parent 87030084
Loading
Loading
Loading
Loading
Loading
+10 −14
Original line number Diff line number Diff line
@@ -223,18 +223,15 @@ class AppsApiImpl @Inject constructor(
        val releaseType = getSystemReleaseType()

        val eligibleApps = systemAppsUpdatesRepository.getAllEligibleApps()
        eligibleApps?.forEach {
            val packageName = it.packageName
        eligibleApps.forEach {

            if (!appLoungePackageManager.isInstalled(it.packageName)) {
            if (!appLoungePackageManager.isInstalled(it)) {
                // Don't install for system apps which are removed (by root or otherwise)
                return@forEach
            }

            val releaseTypes = it.releaseTypes
            if (releaseType in releaseTypes) {
            systemAppsUpdatesRepository.getSystemAppUpdateInfo(
                    packageName,
                it,
                releaseType,
                getSdkLevel(),
                getDevice(),
@@ -243,7 +240,6 @@ class AppsApiImpl @Inject constructor(
                updateList.add(this)
            }
        }
        }

        return updateList
    }
+1 −3
Original line number Diff line number Diff line
@@ -129,9 +129,7 @@ class UpdatesManagerImpl @Inject constructor(
        val systemApps = mutableListOf<Application>()

        getUpdatesFromApi({
            getSystemUpdates().toMutableList().let {
                Pair(it, ResultStatus.OK)
            }
            Pair(getSystemUpdates().toMutableList(), ResultStatus.OK)
        }, systemApps)

        val nonFaultyUpdateList = faultyAppRepository.removeFaultyApps(updateList)