Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 701 Bytes

Note.md

File metadata and controls

18 lines (16 loc) · 701 Bytes

Development Note

Removing adview or preventing add adview may cause following problems

protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
    View view = (View) param.args[0];
    ViewGroup thisView = (ViewGroup) param.thisObject;
    if (isAdView(view.getContext(), pkgName, view)) {
        Util.log(pkgName, "NameBasedBlocking before addView: " + view.getClass().getName());
        if (thisView.getChildCount() == 0) {
            Main.removeAdView(thisView, pkgName, true);
        }
        param.setResult(new Object());
    }
}

Attempt to invoke virtual method 'void com.google.android.gms.ads.AdView.setVisibility(int)' on a null object reference