diff --git a/core/function-impl/mogo-core-function-patch/src/main/java/com/mogo/launcher/patch/PatchManager.kt b/core/function-impl/mogo-core-function-patch/src/main/java/com/mogo/launcher/patch/PatchManager.kt index 2474c0e784..f6de93fd65 100644 --- a/core/function-impl/mogo-core-function-patch/src/main/java/com/mogo/launcher/patch/PatchManager.kt +++ b/core/function-impl/mogo-core-function-patch/src/main/java/com/mogo/launcher/patch/PatchManager.kt @@ -4,8 +4,7 @@ import android.content.* import android.text.TextUtils import android.util.* import com.github.sisong.* -import com.mogo.eagle.core.utilcode.util.AppUtils -import com.mogo.launcher.patch.utils.* +import com.mogo.eagle.core.utilcode.util.* import java.io.File internal object PatchManager { diff --git a/core/function-impl/mogo-core-function-patch/src/main/java/com/mogo/launcher/patch/utils/Md5Util.kt b/core/function-impl/mogo-core-function-patch/src/main/java/com/mogo/launcher/patch/utils/Md5Util.kt deleted file mode 100644 index d0ac1c76ea..0000000000 --- a/core/function-impl/mogo-core-function-patch/src/main/java/com/mogo/launcher/patch/utils/Md5Util.kt +++ /dev/null @@ -1,42 +0,0 @@ -package com.mogo.launcher.patch.utils - -import java.io.* -import java.nio.channels.FileChannel.MapMode -import java.security.* - -class Md5Util { - - companion object { - - /** - * 获取单个文件的MD5值! - * @param file - * @return - * 解决首位0被省略问题 - */ - fun getMd5FromFile(file: File): String? { - var stringbuffer: StringBuffer? = null - try { - val hexDigits = charArrayOf('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f') - val input = FileInputStream(file) - val ch = input.channel - val byteBuffer = ch.map(MapMode.READ_ONLY, 0, file.length()) - val digest = MessageDigest.getInstance("MD5") - digest.update(byteBuffer) - val bytes = digest.digest() - val n = bytes.size - stringbuffer = StringBuffer(2 * n) - for (l in 0 until n) { - val bt = bytes[l] - val c0 = hexDigits[bt.toInt() and 0xf0 shr 4] - val c1 = hexDigits[bt.toInt() and 0xf] - stringbuffer.append(c0) - stringbuffer.append(c1) - } - } catch (e: java.lang.Exception) { - e.printStackTrace() - } - return stringbuffer?.toString() - } - } -} \ No newline at end of file