Java 类de.robv.android.xposed.XposedHelpers.ClassNotFoundError 实例源码

项目:MinMinGuard    文件:OneWeather.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.handmark.expressweather.billing.BillingUtils", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "isPurchased", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                if(!test) {
                    param.setResult(Boolean.valueOf(true));
                }
            }

        });
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Madvertise.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("de.madvertise.android.sdk.MadvertiseMraidView", lpparam.classLoader);

        XposedBridge.hookAllMethods(adView, "loadAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                Util.log(packageName, "Detect Madvertise loadAd in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }

            }
        });

        Util.log(packageName, packageName + " uses Madvertise");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Mobclix.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {

        Class<?> adView = XposedHelpers.findClass("com.mobclix.android.sdk.MobclixMMABannerXLAdView", lpparam.classLoader);

        XposedBridge.hookAllMethods(adView, "getAd" ,new XC_MethodHook() {
                    @Override
                    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                        Util.log(packageName, "Detect MobclixMMABannerXLAdView getAd in " + packageName);

                        if(!test) {
                            param.setResult(new Object());
                            Main.removeAdView((View) param.thisObject, packageName, true);
                        }
                    }
                });

        Util.log(packageName, packageName + " uses Mobclix");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Bonzai.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.bonzai.view.BonzaiAdView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "update", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect BonzaiAdView update in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses Bonzai");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Og.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        final Class<?> adView = XposedHelpers.findClass("com.og.wa.AdWebView", lpparam.classLoader);
        final Class<?> webView = XposedHelpers.findClass("android.webkit.WebView", lpparam.classLoader);
        XposedBridge.hookAllMethods(webView, "loadUrl", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                if(adView.isInstance(param.thisObject)) {
                    Util.log(packageName, "Detect og AdWebView loadUrl in " + packageName);
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses Og AdWebView");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Amobee.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.amobee.adsdk.AdManager", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "getAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect Amobee getAd in " + packageName);
                if(!test) {
                    param.setResult(new Object());
                }
            }

        });

        Util.log(packageName, packageName + " uses Amobee");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Adfurikun.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("jp.tjkapp.adfurikunsdk.AdfurikunBase", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "a", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect AdfurikunAdView update in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses Adfurikun");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:SmartAdserver.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.smartadserver.android.library.ui.SASAdView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "loadAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect SASAdView loadAd in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses SmartAdserver");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Startapp.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.startapp.android.publish.HtmlAd", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "show", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect startapp show in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses startapp");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Chartboost.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.chartboost.sdk.Chartboost", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "showInterstitial", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect Chartboost showInterstitial in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                }
            }

        });
        Util.log(packageName, packageName + " uses Chartboost");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:OpenX.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.openx.ad.mobile.sdk.interfaces.OXMAdBannerView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "loadAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect OXMAdBannerView loadAd in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses OpenX");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:mAdserve.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.adsdk.sdk.banner.InAppWebView", lpparam.classLoader);
        XposedBridge.hookAllConstructors(adView, new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect mAdserve InAppWebView constructor in " + packageName);
                if(!test) {
                    param.setResult(new Object());
                }
            }

        });

        Util.log(packageName, packageName + " uses mAdserve");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:MasAd.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("mediba.ad.sdk.android.openx.MasAdView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "b", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect MasAdAdView update in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses MasAd");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:Nend.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {

        Class<?> adView = XposedHelpers.findClass("net.nend.android.NendAdView", lpparam.classLoader);

        XposedBridge.hookAllMethods(adView, "loadAd" ,new XC_MethodHook() {
                    @Override
                    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                        Util.log(packageName, "Detect NendAdView loadAd in " + packageName);

                        if(!test) {
                            param.setResult(new Object());
                            Main.removeAdView((View) param.thisObject, packageName, true);
                        }
                    }
                });
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:OneWeather.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.handmark.expressweather.billing.BillingUtils", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "isPurchased", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                if(!test) {
                    param.setResult(Boolean.valueOf(true));
                }
            }

        });
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Madvertise.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("de.madvertise.android.sdk.MadvertiseMraidView", lpparam.classLoader);

        XposedBridge.hookAllMethods(adView, "loadAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                Util.log(packageName, "Detect Madvertise loadAd in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }

            }
        });

        Util.log(packageName, packageName + " uses Madvertise");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Bonzai.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.bonzai.view.BonzaiAdView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "update", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect BonzaiAdView update in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses Bonzai");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Og.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        final Class<?> adView = XposedHelpers.findClass("com.og.wa.AdWebView", lpparam.classLoader);
        final Class<?> webView = XposedHelpers.findClass("android.webkit.WebView", lpparam.classLoader);
        XposedBridge.hookAllMethods(webView, "loadUrl", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                if(adView.isInstance(param.thisObject)) {
                    Util.log(packageName, "Detect og AdWebView loadUrl in " + packageName);
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses Og AdWebView");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Amobee.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.amobee.adsdk.AdManager", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "getAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect Amobee getAd in " + packageName);
                if(!test) {
                    param.setResult(new Object());
                }
            }

        });

        Util.log(packageName, packageName + " uses Amobee");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Adfurikun.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("jp.tjkapp.adfurikunsdk.AdfurikunBase", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "a", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect AdfurikunAdView update in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses Adfurikun");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:SmartAdserver.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.smartadserver.android.library.ui.SASAdView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "loadAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect SASAdView loadAd in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses SmartAdserver");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Startapp.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.startapp.android.publish.HtmlAd", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "show", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect startapp show in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses startapp");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Chartboost.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.chartboost.sdk.Chartboost", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "showInterstitial", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect Chartboost showInterstitial in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                }
            }

        });
        Util.log(packageName, packageName + " uses Chartboost");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:OpenX.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.openx.ad.mobile.sdk.interfaces.OXMAdBannerView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "loadAd", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect OXMAdBannerView loadAd in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses OpenX");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:mAdserve.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("com.adsdk.sdk.banner.InAppWebView", lpparam.classLoader);
        XposedBridge.hookAllConstructors(adView, new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect mAdserve InAppWebView constructor in " + packageName);
                if(!test) {
                    param.setResult(new Object());
                }
            }

        });

        Util.log(packageName, packageName + " uses mAdserve");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:MasAd.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {
        Class<?> adView = XposedHelpers.findClass("mediba.ad.sdk.android.openx.MasAdView", lpparam.classLoader);
        XposedBridge.hookAllMethods(adView, "b", new XC_MethodHook() {

            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Util.log(packageName, "Detect MasAdView update in " + packageName);

                if(!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " uses MasAd");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:Nend.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {

        Class<?> adView = XposedHelpers.findClass("net.nend.android.NendAdView", lpparam.classLoader);

        XposedBridge.hookAllMethods(adView, "loadAd" ,new XC_MethodHook() {
                    @Override
                    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                        Util.log(packageName, "Detect NendAdView loadAd in " + packageName);

                        if(!test) {
                            param.setResult(new Object());
                            Main.removeAdView((View) param.thisObject, packageName, true);
                        }
                    }
                });
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:WiFiKeyView    文件:LongPressNetworkClickedHook.java   
private Class<?> getAccessPointClass(MethodHookParam param) {
    // If we already searched before, directly return
    if (accessPointClass == null) {
        // Try to load the class AccessPoint
        try {
            // If the class is not found, an error is thrown
            accessPointClass = XposedHelpers.findClass("AccessPoint", null);

            if (WiFiKeyView.isDebugging()) {
                WiFiKeyView.verboseLog(this, "getAccessPointClass(MethodHookParam)", "AccessPoint class was found");
            }
        } catch (ClassNotFoundError cnfe) {
            // Do not do anything, we will not use it if the reference is null
            if (WiFiKeyView.isDebugging()) {
                WiFiKeyView.verboseLog(this, "getAccessPointClass(MethodHookParam)", "AccessPoint class was not found");
            }
        }
    }

    return accessPointClass;
}
项目:MinMinGuard    文件:_2chMate.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {

    if(!packageName.equals("jp.co.airfront.android.a2chMate")) {
        return false;
    }

    try {

        Class<?> adview = findClass("jp.syoboi.a2chMate.view.MyAdView", lpparam.classLoader);

        XposedHelpers.findAndHookMethod(adview, "a", int.class, String.class, new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                Util.log(packageName, "Detect 2chmate MyAdView in " + packageName);

                if (!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " is 2chmate");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:MinMinGuard    文件:GmsDoubleClick.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {
    try {

        Class<?> admobBanner = findClass("com.google.android.gms.ads.doubleclick.PublisherAdView", lpparam.classLoader);

        XposedBridge.hookAllMethods(admobBanner, "loadAd", new XC_MethodHook() {

                    @Override
                    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                        Util.log(packageName, "Detect GmsDoubleClick PublisherAdView loadAd in " + packageName);

                        if(!test) {
                            param.setResult(new Object());
                            Main.removeAdView((View) param.thisObject, packageName, true);
                        }
                    }

                });


        Util.log(packageName, packageName + " uses GmsDoubleClick");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:NyanNyanGuard    文件:_2chMate.java   
public static boolean handleLoadPackage(final String packageName, LoadPackageParam lpparam, final boolean test) {

    if(!packageName.equals("jp.co.airfront.android.a2chMate")) {
        return false;
    }

    try {

        Class<?> adview = findClass("jp.syoboi.a2chMate.view.MyAdView", lpparam.classLoader);

        XposedHelpers.findAndHookMethod(adview, "a", int.class, String.class, new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {

                Util.log(packageName, "Detect 2chmate MyAdView in " + packageName);

                if (!test) {
                    param.setResult(new Object());
                    Main.removeAdView((View) param.thisObject, packageName, true);
                }
            }

        });
        Util.log(packageName, packageName + " is 2chmate");
    }
    catch(ClassNotFoundError e) {
        return false;
    }
    return true;
}
项目:GravityBox    文件:PieController.java   
public PieController(Context context, Context gbContext, XSharedPreferences prefs) {
    mContext = context;
    mGbContext = gbContext;
    mGbResources = gbContext.getResources();
    mLongPressHandler = new PieLongPressHandler(context, prefs);

    mVibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);

    final PackageManager pm = mContext.getPackageManager();
    mHasTelephony = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);

    final Resources res = mContext.getResources();
    Tracker.sDistance = mGbResources.getDimensionPixelSize(R.dimen.pie_trigger_distance);

    mBackIcon = res.getDrawable(context.getResources().getIdentifier(
            "ic_sysbar_back", "drawable", PACKAGE_NAME), null).mutate();
    mBackAltIcon = res.getDrawable(context.getResources().getIdentifier(
            "ic_sysbar_back_ime", "drawable", PACKAGE_NAME), null).mutate();
    mRecentIcon = res.getDrawable(res.getIdentifier(
            "ic_sysbar_recent", "drawable", PACKAGE_NAME), null).mutate();
    mRecentAltIcon = mGbResources.getDrawable(R.drawable.ic_sysbar_recent_clear, null).mutate();

    try {
        mBaseStatusBarClass = XposedHelpers.findClass(CLASS_BASE_STATUSBAR, mContext.getClassLoader());
    } catch (ClassNotFoundError e) {
        XposedBridge.log(e);
    }

    mSysinfoDisabled = prefs.getBoolean(GravityBoxSettings.PREF_KEY_PIE_SYSINFO_DISABLE, false);
    setLongpressDelay(Integer.valueOf(prefs.getString(
            GravityBoxSettings.PREF_KEY_PIE_LONGPRESS_DELAY, "0")));;

    mColorInfo = new ColorInfo();
    mColorInfo.bgColor = prefs.getInt(GravityBoxSettings.PREF_KEY_PIE_COLOR_BG, 
            mGbResources.getColor(R.color.pie_background_color));
    mColorInfo.selectedColor = prefs.getInt(GravityBoxSettings.PREF_KEY_PIE_COLOR_SELECTED,
            mGbResources.getColor(R.color.pie_selected_color));
    mColorInfo.outlineColor = prefs.getInt(GravityBoxSettings.PREF_KEY_PIE_COLOR_OUTLINE,
            mGbResources.getColor(R.color.pie_outline_color));
    mColorInfo.fgColor = prefs.getInt(GravityBoxSettings.PREF_KEY_PIE_COLOR_FG,
            mGbResources.getColor(R.color.pie_foreground_color));
    mColorInfo.textColor = prefs.getInt(GravityBoxSettings.PREF_KEY_PIE_COLOR_TEXT,
            mGbResources.getColor(R.color.pie_text_color));

    updateColors();
}