本文整理匯總了Java中de.robv.android.xposed.XposedHelpers.findClassIfExists方法的典型用法代碼示例。如果您正苦於以下問題:Java XposedHelpers.findClassIfExists方法的具體用法?Java XposedHelpers.findClassIfExists怎麽用?Java XposedHelpers.findClassIfExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類de.robv.android.xposed.XposedHelpers
的用法示例。
在下文中一共展示了XposedHelpers.findClassIfExists方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: resolveCallCardFragment
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
private static ClassInfo resolveCallCardFragment(ClassLoader cl) {
ClassInfo info = null;
String[] CLASS_NAMES = new String[] { "com.android.incallui.CallCardFragment", "ayv" };
String[] METHOD_NAMES = new String[] { "setDrawableToImageView" };
for (String className : CLASS_NAMES) {
Class<?> clazz = XposedHelpers.findClassIfExists(className, cl);
if (clazz == null || !Fragment.class.isAssignableFrom(clazz))
continue;
info = new ClassInfo(clazz);
for (String methodName : METHOD_NAMES) {
if (methodName.equals("setDrawableToImageView")) {
for (String realMethodName : new String[] { methodName, "b" }) {
Method m = XposedHelpers.findMethodExactIfExists(clazz, realMethodName,
Drawable.class);
if (m != null) {
info.methods.put(methodName, realMethodName);
break;
}
}
}
}
}
return info;
}
示例2: resolveAnswerFragment
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
private static ClassInfo resolveAnswerFragment(ClassLoader cl) {
ClassInfo info = null;
String[] CLASS_NAMES = new String[] { "com.android.incallui.AnswerFragment", "bbw", "bbx" };
String[] METHOD_NAMES = new String[] { "onShowAnswerUi" };
for (String className : CLASS_NAMES) {
Class<?> clazz = XposedHelpers.findClassIfExists(className, cl);
if (clazz == null || !Fragment.class.isAssignableFrom(clazz))
continue;
info = new ClassInfo(clazz);
for (String methodName : METHOD_NAMES) {
if (methodName.equals("onShowAnswerUi")) {
for (String realMethodName : new String[] { methodName, "a" }) {
Method m = XposedHelpers.findMethodExactIfExists(clazz, realMethodName,
boolean.class);
if (m != null) {
info.methods.put(methodName, realMethodName);
break;
}
}
}
}
}
return info;
}
示例3: resolveCallButtonFragment
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
private static ClassInfo resolveCallButtonFragment(ClassLoader cl) {
ClassInfo info = null;
String[] CLASS_NAMES = new String[] { "com.android.incallui.CallButtonFragment" };
String[] METHOD_NAMES = new String[] { "setEnabled" };
for (String className : CLASS_NAMES) {
Class<?> clazz = XposedHelpers.findClassIfExists(className, cl);
if (clazz == null || !Fragment.class.isAssignableFrom(clazz))
continue;
info = new ClassInfo(clazz);
for (String methodName : METHOD_NAMES) {
if (methodName.equals("setEnabled")) {
for (String realMethodName : new String[] { methodName, "a" }) {
Method m = XposedHelpers.findMethodExactIfExists(clazz, realMethodName,
boolean.class);
if (m != null) {
info.methods.put(methodName, realMethodName);
break;
}
}
}
}
}
return info;
}
示例4: resolveDialtactsActivity
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
private static ClassInfo resolveDialtactsActivity(ClassLoader cl) {
ClassInfo info = null;
String[] CLASS_NAMES = new String[] { CLASS_DIALTACTS_ACTIVITY };
String[] METHOD_NAMES = new String[] { "displayFragment" };
for (String className : CLASS_NAMES) {
Class<?> clazz = XposedHelpers.findClassIfExists(className, cl);
if (clazz == null || !Activity.class.isAssignableFrom(clazz))
continue;
info = new ClassInfo(clazz);
for (String methodName : METHOD_NAMES) {
if (methodName.equals("displayFragment")) {
for (String realMethodName : new String[] { methodName, "c" }) {
Method m = XposedHelpers.findMethodExactIfExists(clazz, realMethodName,
Intent.class);
if (m != null) {
info.methods.put(methodName, realMethodName);
if (realMethodName.equals(methodName)) {
info.extra = "showDialpadFragment";
} else {
info.extra = "b";
}
break;
}
}
}
}
}
return info;
}
示例5: resolveDialpadFragment
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
private static ClassInfo resolveDialpadFragment(ClassLoader cl) {
ClassInfo info = null;
String[] CLASS_NAMES = new String[] { "com.android.dialer.app.dialpad.DialpadFragment" };
String[] METHOD_NAMES = new String[] { "onResume", "playTone" };
for (String className : CLASS_NAMES) {
Class<?> clazz = XposedHelpers.findClassIfExists(className, cl);
if (clazz == null || !Fragment.class.isAssignableFrom(clazz))
continue;
info = new ClassInfo(clazz);
for (String methodName : METHOD_NAMES) {
Method m = null;
if (methodName.equals("onResume")) {
m = XposedHelpers.findMethodExactIfExists(clazz, methodName);
} else if (methodName.equals("playTone")) {
for (String realMethodName : new String[] { methodName, "a" }) {
m = XposedHelpers.findMethodExactIfExists(clazz, realMethodName,
int.class, int.class);
if (m != null) break;
}
}
if (m != null) {
info.methods.put(methodName, m.getName());
}
}
}
return info;
}
示例6: resolveDialtactsActivity
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
private static ClassInfo resolveDialtactsActivity(ClassLoader cl) {
ClassInfo info = null;
String[] CLASS_NAMES = new String[]{CLASS_DIALTACTS_APP_ACTIVITY, CLASS_DIALTACTS_ACTIVITY};
String[] METHOD_NAMES = new String[]{"displayFragment"};
for (String className : CLASS_NAMES) {
Class<?> clazz = XposedHelpers.findClassIfExists(className, cl);
if (clazz == null || !Activity.class.isAssignableFrom(clazz)) {
continue;
}
info = new ClassInfo(clazz);
for (String methodName : METHOD_NAMES) {
if (methodName.equals("displayFragment")) {
for (String realMethodName : new String[]{methodName, "a", "c", "b"}) {
Method m = XposedHelpers.findMethodExactIfExists(clazz, realMethodName,
Intent.class);
if (m != null) {
info.methods.put(methodName, realMethodName);
if (realMethodName.equals(methodName)) {
info.extra = "showDialpadFragment";
} else if (realMethodName.equals("c")) {
info.extra = "b";
} else {
info.extra = "c";
}
break;
}
}
}
}
}
return info;
}
示例7: resolveDialpadFragment
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
private static ClassInfo resolveDialpadFragment(ClassLoader cl) {
ClassInfo info = null;
String[] CLASS_NAMES = new String[]{CLASS_DIALTACTS_APP_FRAGMENT, CLASS_DIALTACTS_FRAGMENT};
String[] METHOD_NAMES = new String[]{"onResume", "playTone"};
for (String className : CLASS_NAMES) {
Class<?> clazz = XposedHelpers.findClassIfExists(className, cl);
if (clazz == null || !Fragment.class.isAssignableFrom(clazz))
continue;
info = new ClassInfo(clazz);
for (String methodName : METHOD_NAMES) {
Method m = null;
if (methodName.equals("onResume")) {
m = XposedHelpers.findMethodExactIfExists(clazz, methodName);
} else if (methodName.equals("playTone")) {
for (String realMethodName : new String[]{methodName, "a"}) {
m = XposedHelpers.findMethodExactIfExists(clazz, realMethodName,
int.class, int.class);
if (m != null) break;
}
}
if (m != null) {
info.methods.put(methodName, m.getName());
}
}
}
return info;
}