Skip to content

Commit

Permalink
opt: 应用商店 - 禁用开启推送弹窗的实现逻辑 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Voemp authored and lingqiqi5211 committed Jan 19, 2025
1 parent 0b4622a commit ef2eefe
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ import com.sevtinge.hyperceiler.module.base.*
object DisableStartPushDialog : BaseHook() {
override fun init() {
// 禁用开启推送弹窗
loadClass("com.xiaomi.market.util.NotificationUtils").methodFinder()
.filterByName("isNotificationEnabled")
.filterByParamTypes(String::class.java)
loadClass("com.xiaomi.market.ui.UpdateListFragment").methodFinder()
.filterByName("tryShowDialog")
.first().createHook {
returnConstant(true)
interrupt()
}
loadClass("com.xiaomi.market.util.SettingsUtils").methodFinder()
.filterByName("shouldNotifyUpdate")
loadClass("com.xiaomi.market.ui.update.UpdatePushDialogManager").methodFinder()
.filterByName("tryShowDialog")
.first().createHook {
returnConstant(true)
interrupt()
}
}
}

0 comments on commit ef2eefe

Please sign in to comment.