Skip to content

Commit

Permalink
fix: MessagingStyleNotification on 9.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
klxiaoniu committed Sep 13, 2024
1 parent eba389b commit 5bc84a4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ object MessagingStyleNotification : CommonSwitchFunctionHook(SyncUtils.PROC_ANY)
lateinit var recentInfoBuilder: Method
cNotificationFacade.declaredMethods.forEach {
if (it.paramCount < 3 || it.parameterTypes[0] != cAppRuntime) return@forEach
if (it.paramCount == 3 && it.parameterTypes[2] == cCommonInfo) {
if (it.paramCount == 3 && it.parameterTypes[2] == cCommonInfo ||
it.paramCount == 4 && it.parameterTypes[2] == cCommonInfo && it.parameterTypes[3] == cRecentInfo // since 9.1.0
) {
buildNotification = it
} else if (it.paramCount >= 3 && it.parameterTypes[1] == cRecentInfo && it.parameterTypes[2] == Boolean::class.java) {
// paramCount=4 since 9.0.75
Expand Down

0 comments on commit 5bc84a4

Please sign in to comment.