Skip to content

Commit

Permalink
1. updated: added chrome debug mode flag, enables chrome debug withou…
Browse files Browse the repository at this point in the history
…t switching between debug and production lib

Signed-off-by: Jack Cheung <[email protected]>
  • Loading branch information
Jack Cheung committed Jun 29, 2016
1 parent bbaed68 commit 9b634de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Project-wide Gradle settings.
VERSION_NAME=1.4.2
VERSION_NAME=1.4.3
VERSION_CODE=34
GROUP=com.hkm.ezwebview
PUBLISH_GROUP_ID=com.hkm.ezwebview
Expand Down
8 changes: 7 additions & 1 deletion library/src/main/java/com/hkm/ezwebview/Util/Fx9C.java
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ private static boolean hideSlider(final Object view) {
protected long animateDuration;
protected String baseUrl = "";
protected CacheMode cacheMode = CacheMode.LOAD_DEFAULT;
protected boolean enableChromeDebug = false;
protected WebViewClient webViewClient = null;
protected boolean isJavaScriptEnabled = true;
protected RelativeLayout webViewHolder;
Expand Down Expand Up @@ -625,6 +626,11 @@ public Fx9C setCacheMode(CacheMode cacheMode) {
return this;
}

public Fx9C setEnableChromeDebug(boolean enableDebug) {
enableChromeDebug = enableDebug;
return this;
}

public Fx9C setJavaScriptEnabled(boolean isJavaScriptEnabled) {
this.isJavaScriptEnabled = isJavaScriptEnabled;
return this;
Expand Down Expand Up @@ -713,7 +719,7 @@ protected void updateWebChromeClient() {

public void loadUrl(String url) throws Exception {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
webView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG);
webView.setWebContentsDebuggingEnabled(enableChromeDebug||BuildConfig.DEBUG);
}

if (webViewClient != null) {
Expand Down

0 comments on commit 9b634de

Please sign in to comment.