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

Commit 7e1e58c7 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

chore: add debug instruction

parent d002ca4c
Loading
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -122,7 +122,10 @@ class SystemAppsUpdatesRepository @Inject constructor(

        if (systemAppProject.dependsOnAndroidVersion) {
            val versionSuffix = "-$androidVersionCode"
            Timber.d("Filtering app on $versionSuffix")
            Timber.d("Release list's size for $projectId before filtering is: ${releases.size}")
            releases = releases.filter { isVersionedTag(it.tagName, versionSuffix) }
            Timber.d("Release list's size for $projectId after filtering is: ${releases.size}")
        }


@@ -151,10 +154,19 @@ class SystemAppsUpdatesRepository @Inject constructor(
        device: String,
    ): Application? {

        val systemAppProject = systemAppProjectList.find { it.packageName == packageName } ?: return null
        val detailsUrl = getReleaseDetailsUrl(systemAppProject, releaseType) ?: return null
        val systemAppProject = systemAppProjectList.find { it.packageName == packageName } ?: run {
            Timber.e("Can't find $packageName in System apps")
            return null
        }
        val detailsUrl = getReleaseDetailsUrl(systemAppProject, releaseType) ?: run {
            Timber.e("Can't get url for release's detail for $packageName of $releaseType")
            return null
        }

        val systemAppInfo = getSystemAppInfo(packageName, detailsUrl) ?: return null
        val systemAppInfo = getSystemAppInfo(packageName, detailsUrl) ?: run {
            Timber.e("Can't get system App info for $packageName with $detailsUrl")
            return null
        }

        return if (isSystemAppBlocked(systemAppInfo, sdkLevel, device)) {
            Timber.e("Blocked system app: $packageName, details: $systemAppInfo")
@@ -232,6 +244,7 @@ class SystemAppsUpdatesRepository @Inject constructor(
                )
            }


            result.data?.run {
                applicationDataManager.updateStatus(this)
                updateList.add(this)