From a8be482b2a0f588301db85324b447b4c8ded2d12 Mon Sep 17 00:00:00 2001 From: Monkeylord Date: Wed, 24 Jul 2019 21:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E5=B0=8FBu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/monkeylord/XServer/api/MethodView.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/monkeylord/XServer/api/MethodView.java b/app/src/main/java/monkeylord/XServer/api/MethodView.java index 12b3514..9a78908 100644 --- a/app/src/main/java/monkeylord/XServer/api/MethodView.java +++ b/app/src/main/java/monkeylord/XServer/api/MethodView.java @@ -9,6 +9,7 @@ import monkeylord.XServer.handler.ClassHandler; import monkeylord.XServer.handler.MethodHandler; import monkeylord.XServer.handler.ObjectHandler; +import monkeylord.XServer.utils.Utils; //查看方法详情页面 public class MethodView implements XServer.Operation { @@ -18,6 +19,11 @@ public String handle(String url, Map parms, Map Method method=null; if(parms.get("javaname")!=null) { method = MethodHandler.getMethodbyJavaName(parms.get("javaname")); + for (int i = 0; i < method.getDeclaringClass().getDeclaredMethods().length; i++) { + if(Utils.getJavaName(method.getDeclaringClass().getDeclaredMethods()[i]).equals(parms.get("javaname"))){ + parms.put("method",""+i); + } + } } if(method==null)method=ClassHandler.findClassbyName(parms.get("class"),XposedEntry.classLoader).getDeclaredMethods()[Integer.parseInt(parms.get("method"))]; HashMap map = MethodHandler.getMethodDetail(method);