Closed mice777 closed 7 years ago
Fixed with 89d77ffe91084e749bbcf8646351f814c9fdda6d. Install a snapshot build, 0.2.0 is outdated.
Why don't you better fix it this way:
legacy = (boolean)XposedHelpers.findMethodBestMatch(Notification.Builder.class, "isLegacy").invoke(builder);
You know there is still method isLegacy on inherited class, you just have to lookup it on correct class.
Description It crashes ugly on Android 6 when this construct is used. Notification.Builder is not final, so it's valid for app to inherit from it.
Module version (build version) 0.2.0 (5)
Xposed log / logcat
java.lang.NoSuchMethodError: com.xxx.test.App$NotificationBuilder#isLegacy()#bestmatch at de.robv.android.xposed.XposedHelpers.findMethodBestMatch(XposedHelpers.java:440) at de.robv.android.xposed.XposedHelpers.findMethodBestMatch(XposedHelpers.java:453) at de.robv.android.xposed.XposedHelpers.callMethod(XposedHelpers.java:1217) at tk.wasdennnoch.androidn_ify.notifications.NotificationsHooks$5.replaceHookedMethod(NotificationsHooks.java:251) at de.robv.android.xposed.XC_MethodReplacement.beforeHookedMethod(XC_MethodReplacement.java:29) at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:314) at android.app.Notification$Builder.processSmallIconAsLarge()
at android.app.Notification$Builder.applyStandardTemplate(Notification.java:2979)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
at android.app.Notification$Builder.applyStandardTemplate()
at android.app.Notification$Builder.applyStandardTemplate(Notification.java:2955)
at android.app.Notification$Builder.makeContentView(Notification.java:3151)
at android.app.Notification$Builder.buildUnstyled(Notification.java:3326)
at android.app.Notification$Builder.build(Notification.java:3661)
at com.xxx.test.App.test(App.java:20)