When trying to call a method I get a NoSuchMethodError even though:
"findMethodExact" successfully works
and class.getMethods also returns the method as
(public com.android.internal.telephony.Call$State com.android.internal.telephony.Connection.getState())
I have tried multiple variations and inspecting Xposed modules open source code but nothing has worked so far.
I would appreciate it if someone could please hint me at what am I doing wrong.
I have also tried unsuccessfully:
callMethod(param, "getState")
callMethod(param.thisObject, "getState")
callMethod("com.android.internal.telephony.Connection", "getState")
When trying to call a method I get a NoSuchMethodError even though:
I have tried multiple variations and inspecting Xposed modules open source code but nothing has worked so far.
I would appreciate it if someone could please hint me at what am I doing wrong.
METHOD BEING CALLED Class: Connection Method: Call.State getState() http://androidxref.com/4.4.2_r2/xref/frameworks/opt/telephony/src/java/com/android/internal/telephony/Connection.java#174
METHOD BEING HOOKED This occurs when hooking Class: CallNotifier Method: "ringAndNotifyOfIncomingCall" http://androidxref.com/4.4.2_r2/xref/packages/services/Telephony/src/com/android/phone/CallNotifier.java#656
CODE
ConnectionCustomClass = XposedHelpers.findClass("com.android.internal.telephony.Connection", lpparam.classLoader);
.... inside the private void beforeHookedMethod ...
if (!(Boolean) XposedHelpers.callStaticMethod(PhoneUtils, "isRealIncomingCall", XposedHelpers.callMethod(ConnectionCustomClass, "getState"))) { XposedBridge.log("not true"); } else { XposedBridge.log("true"); }
///////////
I have also tried unsuccessfully: callMethod(param, "getState") callMethod(param.thisObject, "getState") callMethod("com.android.internal.telephony.Connection", "getState")
Thank you for your attention.