當前位置: 首頁>>代碼示例>>Java>>正文


Java XposedHelpers.findMethodExactIfExists方法代碼示例

本文整理匯總了Java中de.robv.android.xposed.XposedHelpers.findMethodExactIfExists方法的典型用法代碼示例。如果您正苦於以下問題:Java XposedHelpers.findMethodExactIfExists方法的具體用法?Java XposedHelpers.findMethodExactIfExists怎麽用?Java XposedHelpers.findMethodExactIfExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在de.robv.android.xposed.XposedHelpers的用法示例。


在下文中一共展示了XposedHelpers.findMethodExactIfExists方法的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.findMethodExactIfExists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。