Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
import tw.fatminmin.xposed.minminguard.blocker.Util;

//TODO Fix formatting
final class Train
public final class Train
{

private static String pkg = "idv.nightgospel.TWRailScheduleLookUp";

private Train() throws InstantiationException
Expand All @@ -31,9 +29,8 @@ public static void handleLoadPackage(LoadPackageParam lpparam)
@Override
protected void beforeHookedMethod(MethodHookParam param)
{

Util.log(pkg, "Prevent WSAdBanner setWSAdListener " + pkg);

String debugMsg = String.format("Prevent WSAdBanner setWSAdListener %s", pkg);
Util.log(pkg, debugMsg);
param.setResult(new Object());
}
});
Expand All @@ -48,16 +45,16 @@ public static void handleInitPackageResources(InitPackageResourcesParam resparam

resparam.res.hookLayout(pkg, "layout", "adlayout", new XC_LayoutInflated()
{

@Override
public void handleLayoutInflated(LayoutInflatedParam liparam)
{

Util.log(pkg, "Handle train ad layout");

String debugMsg = String.format("Handle train ad layout %s", pkg);
Util.log(pkg, debugMsg);
View ad = liparam.view.findViewById(liparam.res.getIdentifier("adLayout", "id", pkg));

ad.setVisibility(View.GONE);
if (ad != null)
{
ad.setVisibility(View.GONE);
}
}
});
}
Expand Down
Loading