用反射来调用Android里的隐藏Class

Object obj = new Object();
Method method = Class.forName("android.os.ServiceManager").getMethod("getService", String.class);
System.out.println(method.invoke(obj, "phone"));

你可能感兴趣的:(用反射来调用Android里的隐藏Class)