当前位置: 首页>>代码示例>>Java>>正文


Java XposedHelpers.findClassIfExists方法代码示例

本文整理汇总了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;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:25,代码来源:ModDialer24.java

示例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;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:25,代码来源:ModDialer24.java

示例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;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:25,代码来源:ModDialer24.java

示例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;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:30,代码来源:ModDialer24.java

示例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;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:28,代码来源:ModDialer24.java

示例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;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:33,代码来源:ModDialer25.java

示例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;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:28,代码来源:ModDialer25.java


注:本文中的de.robv.android.xposed.XposedHelpers.findClassIfExists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。