Minor changes

This commit is contained in:
topjohnwu
2020-10-17 04:14:12 -07:00
parent 2760f37e6b
commit 9087207dc0
3 changed files with 3 additions and 4 deletions

View File

@@ -18,7 +18,6 @@ object Const {
// Misc
const val ANDROID_MANIFEST = "AndroidManifest.xml"
const val MAGISK_INSTALL_LOG_FILENAME = "magisk_install_log_%s.log"
const val MANAGER_CONFIGS = ".tmp.magisk.config"
val USER_ID = Process.myUid() / 100000
object Version {

View File

@@ -69,8 +69,8 @@ abstract class BaseDownloader : BaseService(), KoinComponent {
// -- Download logic
private suspend fun Subject.startDownload() {
val skipDl = this is Subject.Magisk && file.checkSum("MD5", magisk.md5)
if (!skipDl) {
val skip = this is Subject.Magisk && file.checkSum("MD5", magisk.md5)
if (!skip) {
val stream = service.fetchFile(url).toProgressStream(this)
when (this) {
is Subject.Module -> // Download and process on-the-fly