Skip to content

Commit

Permalink
Fix bugs about WebView
Browse files Browse the repository at this point in the history
  • Loading branch information
Chipppppppppp committed Jan 20, 2024
1 parent c153c21 commit e06f2dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/io/github/chipppppppppp/lime/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
WebView webView = (WebView) param.thisObject;
Activity activity = (Activity) webView.getContext();
if (!activity.getClass().getName().equals("jp.naver.line.android.activity.iab.InAppBrowserActivity")) return;
webView.setVisibility(View.GONE);
webView.stopLoading();
Uri uri = Uri.parse((String) param.args[0]);
Expand All @@ -88,7 +89,9 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
intent.setData(uri);
activity.startActivity(intent);
} else {
CustomTabsIntent tabsIntent = new CustomTabsIntent.Builder().setShowTitle(true).build();
CustomTabsIntent tabsIntent = new CustomTabsIntent.Builder()
.setShowTitle(true)
.build();
tabsIntent.launchUrl(activity, uri);
}
activity.finish();
Expand Down

0 comments on commit e06f2dc

Please sign in to comment.