Index: libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/MainActivity.java |
=================================================================== |
--- a/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/MainActivity.java |
+++ b/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/MainActivity.java |
@@ -55,16 +55,23 @@ |
@Override |
protected void onCreate(Bundle savedInstanceState) |
{ |
super.onCreate(savedInstanceState); |
setContentView(R.layout.activity_main); |
bindControls(); |
initControls(); |
+ |
+ // allow WebView debugging in "Debug" build variant |
+ // https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews |
+ if (BuildConfig.DEBUG) |
+ { |
+ WebView.setWebContentsDebuggingEnabled(true); |
+ } |
} |
private void bindControls() |
{ |
url = (EditText) findViewById(R.id.main_url); |
ok = (Button) findViewById(R.id.main_ok); |
back = (Button) findViewById(R.id.main_back); |
forward = (Button) findViewById(R.id.main_forward); |