Skip to content

Commit

Permalink
fix VMRuntime instance
Browse files Browse the repository at this point in the history
  • Loading branch information
teble committed Oct 12, 2023
1 parent 48b797e commit a9d1ba1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fun MainLayout(navController: NavHostController) {
fetchMeta()
}
meta ?: ToastUtil.send("拉取公告失败")
notice.value = meta?.notice ?: ""
notice.value = meta?.notice?.trimEnd() ?: ""
}
}
if (showUpdateDialog.value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object NativeUtil {
private val is64Bit: Boolean
get() {
val clazz = Class.forName("dalvik.system.VMRuntime")
return clazz.new().invoke("is64Bit") as Boolean
return clazz.invoke("getRuntime")!!.invoke("is64Bit") as Boolean
}

private fun getLibFilePath(name: String): String {
Expand Down

0 comments on commit a9d1ba1

Please sign in to comment.