比如:我想调用 “com.android.internal.policy.PolicyManager” 中的 “makeNewWindow”方法。
String POLICYMANAGER_CLASS_NAME = "com.android.internal.policy.PolicyManager";
try {
Class policyClass = Class.forName(POLICYMANAGER_CLASS_NAME);
Method makeNewWindow = policyClass.getMethod("makeNewWindow",
new Class[] { Context.class });
时间: 2024-11-06 07:18:34