alice-mkh / tabletkat

True tablet UI for KitKat
http://repo.xposed.info/module/org.exalm.tabletkat
15 stars 5 forks source link

Method found but calling throws NoSuchMethodError #16

Closed nick1212 closed 9 years ago

nick1212 commented 9 years ago

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.

alice-mkh commented 9 years ago

Does that do anything with TabletKat?..

nick1212 commented 9 years ago

Sorry I posted this on the wrong repository.