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

Commit d7606aa3 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

SplitInstall: Delete already downloaded apk

Indeed, we faced some version missmatches between
new & old versions when trying to instal the split apk.
parent 547fbf84
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -76,6 +76,13 @@ class DownloadManager @Inject constructor(
        }

        val downloadFile = File("$directoryFile/$fileName")
        if (downloadFile.exists()) {
            try {
                downloadFile.delete()
            } catch (exception: Exception) {
                Timber.e("Could not delete already existing split apk: $downloadFile", exception)
            }
        }

        return downloadFile(url, downloadFile, downloadCompleted)
    }