public static Object callMethod(Object obj, String methodName, Object... args) {
        try {
            return findMethodBestMatch(obj.getClass(), methodName, args).invoke(obj, args);
        } catch (IllegalAccessException e) {
            // should not happen
            XposedBridge.log(e);
            throw new IllegalAccessError(e.getMessage());
        } catch (IllegalArgumentException e) {
            throw e;
        } catch (InvocationTargetException e) {
            throw new InvocationTargetError(e.getCause());
        }
    }
Calls an instance or static method of the given object.
The method is resolved using {@link #findMethodBestMatch(Class, String, Object...)}.

@param obj        The object instance. A class reference is not sufficient!
@param methodName The method name.
@param args       The arguments for the method call.
@throws NoSuchMethodError     In case no suitable method was found.
@throws InvocationTargetError In case an exception was thrown by the invoked method.
android/android_framework/base/src/main/java/util/XposedHelpers.java