From 17c88b079b4bfbb93ba07c74efd932eae1a1239b Mon Sep 17 00:00:00 2001 From: Syuugo Date: Wed, 9 Oct 2024 04:34:45 +0900 Subject: [PATCH] space --- .../github/chipppppppppp/lime/hooks/RedirectWebView.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/github/chipppppppppp/lime/hooks/RedirectWebView.java b/app/src/main/java/io/github/chipppppppppp/lime/hooks/RedirectWebView.java index 2bdd2b1..1e5974d 100644 --- a/app/src/main/java/io/github/chipppppppppp/lime/hooks/RedirectWebView.java +++ b/app/src/main/java/io/github/chipppppppppp/lime/hooks/RedirectWebView.java @@ -26,16 +26,15 @@ public class RedirectWebView implements IHook { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { Activity activity = (Activity) param.thisObject; - View rootView = activity.getWindow().getDecorView().getRootView(); WebView webView = findWebView(rootView); if (webView != null) { webView.setVisibility(View.GONE); webView.stopLoading(); - + Uri uri = Uri.parse(webView.getUrl()); - + if (limeOptions.openInBrowser.checked) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(uri); @@ -47,7 +46,7 @@ public class RedirectWebView implements IHook { .build(); tabsIntent.launchUrl(activity, uri); } - + activity.finish(); } @@ -55,6 +54,7 @@ public class RedirectWebView implements IHook { } ); } + private WebView findWebView(View view) { if (view instanceof WebView) { return (WebView) view;