Skip to content

Commit

Permalink
try fix update version show
Browse files Browse the repository at this point in the history
  • Loading branch information
lingqiqi5211 authored Nov 13, 2023
1 parent ef318bb commit 6911a21
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.os.Build
import android.text.TextUtils
import com.github.kyuubiran.ezxhelper.EzXHelper
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
import com.sevtinge.hyperceiler.module.base.BaseHook
import com.sevtinge.hyperceiler.utils.DexKit.addUsingStringsEquals
import com.sevtinge.hyperceiler.utils.DexKit.dexKitBridge
Expand All @@ -20,9 +21,9 @@ object VersionCodeNew : BaseHook() {
private val mOSMethod by lazy {
dexKitBridge.findMethod {
matcher {
addUsingStringsEquals("ro.mi.os.version.incremental", "version:")
addUsingStringsEquals("ro.mi.os.version.incremental")
}
}.map { it.getMethodInstance(EzXHelper.classLoader) }.first()
}.map { it.getMethodInstance(EzXHelper.classLoader) }.toList()
}
private val mOSCode by lazy {
dexKitBridge.findMethod {
Expand Down Expand Up @@ -65,7 +66,7 @@ object VersionCodeNew : BaseHook() {
}

// OS 版本名修改
mOSMethod.createHook {
mOSMethod.createHooks {
before {
if (!TextUtils.isEmpty(mVersionCode)) {
it.result = mVersionCode
Expand Down

0 comments on commit 6911a21

Please sign in to comment.