Update InAppBrowserActivity.java

This commit is contained in:
Lorenzo Pichilli 2023-05-16 02:50:46 +02:00 committed by GitHub
parent 3833b5dd5e
commit 814e1b22ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 10 deletions

View File

@ -539,16 +539,6 @@ public class InAppBrowserActivity extends AppCompatActivity implements InAppBrow
if (webView.channelDelegate != null) {
webView.channelDelegate.dispose();
}
ViewGroup vg = (ViewGroup) (webView.getParent());
if (vg != null) {
// Modified view removal to try and fix a crash
for (int i = 0; i < vg.getChildCount(); i++) {
View v = vg.getChildAt(i);
v.setVisibility(View.GONE);
}
// instead of using
// vg.removeView(webView);
}
webView.setWebChromeClient(new WebChromeClient());
webView.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {