Android remove setWebContentsDebuggingEnabled

This commit is contained in:
pengfei.zhou 2022-06-22 19:02:04 +08:00 committed by osborn
parent 993852fd5e
commit 3594217839
2 changed files with 6 additions and 6 deletions

View File

@ -322,9 +322,9 @@ public class DoricWebShellJSExecutor implements IDoricJSE {
@Override @Override
public void run() { public void run() {
webView = new WebView(context.getApplicationContext()); webView = new WebView(context.getApplicationContext());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && BuildConfig.DEBUG) { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && BuildConfig.DEBUG) {
WebView.setWebContentsDebuggingEnabled(true); // WebView.setWebContentsDebuggingEnabled(true);
} // }
WebSettings webSettings = webView.getSettings(); WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true); webSettings.setJavaScriptEnabled(true);
webView.setWebChromeClient(new DoricWebChromeClient()); webView.setWebChromeClient(new DoricWebChromeClient());

View File

@ -224,9 +224,9 @@ public class DoricWebViewJSExecutor implements IDoricJSE {
webView.loadUrl("about:blank"); webView.loadUrl("about:blank");
WebViewCallback webViewCallback = new WebViewCallback(); WebViewCallback webViewCallback = new WebViewCallback();
webView.addJavascriptInterface(webViewCallback, "NativeClient"); webView.addJavascriptInterface(webViewCallback, "NativeClient");
if (BuildConfig.DEBUG) { // if (BuildConfig.DEBUG) {
WebView.setWebContentsDebuggingEnabled(true); // WebView.setWebContentsDebuggingEnabled(true);
} // }
} }
}); });
} }