Loading app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt +9 −11 Original line number Diff line number Diff line Loading @@ -76,20 +76,18 @@ class SystemAppsUpdatesRepository @Inject constructor( val projectId = systemAppProjectList.find { it.packageName == packageName }?.projectId ?: return null val response = systemAppDefinitionApi.getSystemAppUpdateInfo(projectId, releaseType) if (!response.isSuccessful) { Timber.e("Failed to fetch system app update definition for: $packageName, $releaseType") return null } val systemAppInfo = response.body() ?: return null val systemAppInfo = systemAppDefinitionApi.getSystemAppUpdateInfo(projectId, releaseType).body() if (isSystemAppBlacklisted(systemAppInfo, sdkLevel, device)) { return if (systemAppInfo == null) { Timber.e("Null app info for: $packageName") null } else if (isSystemAppBlacklisted(systemAppInfo, sdkLevel, device)) { Timber.e("Blacklisted system app: $packageName, $systemAppInfo") return null null } else { systemAppInfo.toApplication() } return systemAppInfo.toApplication() } private fun getSdkLevel(): Int { Loading Loading
app/src/main/java/foundation/e/apps/data/gitlab/SystemAppsUpdatesRepository.kt +9 −11 Original line number Diff line number Diff line Loading @@ -76,20 +76,18 @@ class SystemAppsUpdatesRepository @Inject constructor( val projectId = systemAppProjectList.find { it.packageName == packageName }?.projectId ?: return null val response = systemAppDefinitionApi.getSystemAppUpdateInfo(projectId, releaseType) if (!response.isSuccessful) { Timber.e("Failed to fetch system app update definition for: $packageName, $releaseType") return null } val systemAppInfo = response.body() ?: return null val systemAppInfo = systemAppDefinitionApi.getSystemAppUpdateInfo(projectId, releaseType).body() if (isSystemAppBlacklisted(systemAppInfo, sdkLevel, device)) { return if (systemAppInfo == null) { Timber.e("Null app info for: $packageName") null } else if (isSystemAppBlacklisted(systemAppInfo, sdkLevel, device)) { Timber.e("Blacklisted system app: $packageName, $systemAppInfo") return null null } else { systemAppInfo.toApplication() } return systemAppInfo.toApplication() } private fun getSdkLevel(): Int { Loading