Loading app/src/main/java/foundation/e/apps/data/fusedDownload/FusedManagerImpl.kt +6 −2 Original line number Diff line number Diff line Loading @@ -89,11 +89,15 @@ class FusedManagerImpl @Inject constructor( override suspend fun updateDownloadStatus(fusedDownload: FusedDownload, status: Status) { if (status == Status.INSTALLED) { fusedDownload.status = status if (fusedDownload.packageName != context.packageName) { flushOldDownload(fusedDownload.packageName) } fusedDownloadRepository.deleteDownload(fusedDownload) } else if (status == Status.INSTALLING) { fusedDownload.downloadIdMap.all { true } fusedDownload.status = status fusedDownload.status = if (fusedDownload.packageName == context.packageName) Status.INSTALLED else status fusedDownloadRepository.updateDownload(fusedDownload) installApp(fusedDownload) } Loading app/src/main/java/foundation/e/apps/data/fusedDownload/models/FusedDownload.kt +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ data class FusedDownload( val isFree: Boolean = true, var appSize: Long = 0, var files: List<File> = mutableListOf(), var isSystemApp: Boolean = false, var signature: String = String() ) { @Ignore Loading app/src/main/java/foundation/e/apps/install/download/DownloadManagerUtils.kt +4 −3 Original line number Diff line number Diff line Loading @@ -134,9 +134,10 @@ class DownloadManagerUtils @Inject constructor( } private suspend fun checkCleanApkSignatureOK(fusedDownload: FusedDownload): Boolean { if (fusedDownload.origin != Origin.CLEANAPK || fusedManagerRepository.isFdroidApplicationSigned( context, fusedDownload ) if ( fusedDownload.isSystemApp || fusedDownload.origin != Origin.CLEANAPK || fusedManagerRepository.isFdroidApplicationSigned(context, fusedDownload) ) { Timber.d("Apk signature is OK") return true Loading app/src/main/java/foundation/e/apps/install/workmanager/AppInstallProcessor.kt +7 −3 Original line number Diff line number Diff line Loading @@ -87,10 +87,11 @@ class AppInstallProcessor @Inject constructor( application.latest_version_code, application.offer_type, application.isFree, application.originalSize application.originalSize, isSystemApp = application.isSystemApp, ) if (fusedDownload.type == Type.PWA) { if (fusedDownload.type == Type.PWA || application.isSystemApp) { fusedDownload.downloadURLList = mutableListOf(application.url) } Loading @@ -115,7 +116,10 @@ class AppInstallProcessor @Inject constructor( return } if (fusedDownload.type != Type.PWA && !updateDownloadUrls(fusedDownload)) return if (!fusedDownload.isSystemApp && fusedDownload.type != Type.PWA && !updateDownloadUrls( fusedDownload ) ) return val downloadAdded = fusedManagerRepository.addDownload(fusedDownload) if (!downloadAdded) { Loading Loading
app/src/main/java/foundation/e/apps/data/fusedDownload/FusedManagerImpl.kt +6 −2 Original line number Diff line number Diff line Loading @@ -89,11 +89,15 @@ class FusedManagerImpl @Inject constructor( override suspend fun updateDownloadStatus(fusedDownload: FusedDownload, status: Status) { if (status == Status.INSTALLED) { fusedDownload.status = status if (fusedDownload.packageName != context.packageName) { flushOldDownload(fusedDownload.packageName) } fusedDownloadRepository.deleteDownload(fusedDownload) } else if (status == Status.INSTALLING) { fusedDownload.downloadIdMap.all { true } fusedDownload.status = status fusedDownload.status = if (fusedDownload.packageName == context.packageName) Status.INSTALLED else status fusedDownloadRepository.updateDownload(fusedDownload) installApp(fusedDownload) } Loading
app/src/main/java/foundation/e/apps/data/fusedDownload/models/FusedDownload.kt +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ data class FusedDownload( val isFree: Boolean = true, var appSize: Long = 0, var files: List<File> = mutableListOf(), var isSystemApp: Boolean = false, var signature: String = String() ) { @Ignore Loading
app/src/main/java/foundation/e/apps/install/download/DownloadManagerUtils.kt +4 −3 Original line number Diff line number Diff line Loading @@ -134,9 +134,10 @@ class DownloadManagerUtils @Inject constructor( } private suspend fun checkCleanApkSignatureOK(fusedDownload: FusedDownload): Boolean { if (fusedDownload.origin != Origin.CLEANAPK || fusedManagerRepository.isFdroidApplicationSigned( context, fusedDownload ) if ( fusedDownload.isSystemApp || fusedDownload.origin != Origin.CLEANAPK || fusedManagerRepository.isFdroidApplicationSigned(context, fusedDownload) ) { Timber.d("Apk signature is OK") return true Loading
app/src/main/java/foundation/e/apps/install/workmanager/AppInstallProcessor.kt +7 −3 Original line number Diff line number Diff line Loading @@ -87,10 +87,11 @@ class AppInstallProcessor @Inject constructor( application.latest_version_code, application.offer_type, application.isFree, application.originalSize application.originalSize, isSystemApp = application.isSystemApp, ) if (fusedDownload.type == Type.PWA) { if (fusedDownload.type == Type.PWA || application.isSystemApp) { fusedDownload.downloadURLList = mutableListOf(application.url) } Loading @@ -115,7 +116,10 @@ class AppInstallProcessor @Inject constructor( return } if (fusedDownload.type != Type.PWA && !updateDownloadUrls(fusedDownload)) return if (!fusedDownload.isSystemApp && fusedDownload.type != Type.PWA && !updateDownloadUrls( fusedDownload ) ) return val downloadAdded = fusedManagerRepository.addDownload(fusedDownload) if (!downloadAdded) { Loading