Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29351744: Issue 4399 - Add WebView inheritor with ad blocking (Closed)

Created:
Sept. 8, 2016, 12:52 p.m. by anton
Modified:
Jan. 10, 2017, 12:18 p.m.
CC:
René Jeschke, vicky
Visibility:
Public.

Description

Issue 4399 - Add WebView inheritor with ad blocking Depends on #https://codereview.adblockplus.org/29349720/ The sources can be found in https://github.com/4ntoine/libadblockplus-android/commits/issue-4399 patch set 20 (and probably the following are in https://codereview.adblockplus.org/29361445/)

Patch Set 1 #

Total comments: 6

Patch Set 2 : updated README #

Total comments: 1

Patch Set 3 : removed gradlew.bat - it relates to issue-4324 #

Patch Set 4 : now loading elemhide selectors beforehand in bg thread #

Total comments: 4

Patch Set 5 : yet another improvement - working with null urls (for local files) #

Patch Set 6 : added goBack/goForward support, added 'setAAenabled' setting, modified app for testing #

Patch Set 7 : stopping for fast redirection #

Patch Set 8 : supporting api 21 with referer and pre-21 with no referer #

Total comments: 2

Patch Set 9 : updated Ant/Maven build configuration files #

Patch Set 10 : moved AdblockWebView to separate module #

Patch Set 11 : added Maven build configuration files for -webview and -webviewapp modules #

Patch Set 12 : added current url as referer for main frame #

Patch Set 13 : moved from experimental gradle plugin to standard one (with new ndk support) #

Patch Set 14 : added enabled/disabled property #

Patch Set 15 : get 'isMainFrame' for android-pre-21 and #4518 fix #

Patch Set 16 : fixed #4543 #

Patch Set 17 : minor codestyle fixes #

Patch Set 18 : fixed: hardcoded js bridge name #

Patch Set 19 : changed packages, now using AdblockEngine (original ABPEngine), improved demo app #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3120 lines, -391 lines) Patch
M .gitignore View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -5 lines 0 comments Download
M .hgignore View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -13 lines 0 comments Download
M README.md View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +100 lines, -4 lines 0 comments Download
M build.gradle View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -5 lines 0 comments Download
M gradle/wrapper/gradle-wrapper.properties View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M libadblockplus-android-tests/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M libadblockplus-android-tests/build.gradle View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -3 lines 0 comments Download
M libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/AndroidWebRequestTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +26 lines, -3 lines 0 comments Download
A libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/UtilsTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +55 lines, -0 lines 0 comments Download
A libadblockplus-android-webview/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +11 lines, -0 lines 0 comments Download
A libadblockplus-android-webview/assets/css.js View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
A + libadblockplus-android-webview/assets/empty.js View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
A libadblockplus-android-webview/assets/hide.js View 1 2 3 4 5 6 7 8 9 1 chunk +29 lines, -0 lines 0 comments Download
A libadblockplus-android-webview/assets/inject.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +44 lines, -0 lines 0 comments Download
A libadblockplus-android-webview/build.gradle View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +33 lines, -0 lines 0 comments Download
A + libadblockplus-android-webview/build.xml View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -8 lines 0 comments Download
A libadblockplus-android-webview/pom.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +69 lines, -0 lines 0 comments Download
A + libadblockplus-android-webview/project.properties View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -1 line 0 comments Download
A libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1514 lines, -0 lines 0 comments Download
A libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/IoThreadClientInvocationHandler.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +53 lines, -0 lines 0 comments Download
A libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/ReflectionUtils.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +107 lines, -0 lines 0 comments Download
A libadblockplus-android-webviewapp/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +28 lines, -0 lines 0 comments Download
A libadblockplus-android-webviewapp/build.gradle View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +45 lines, -0 lines 0 comments Download
A + libadblockplus-android-webviewapp/build.xml View 2 chunks +7 lines, -8 lines 0 comments Download
A libadblockplus-android-webviewapp/pom.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +66 lines, -0 lines 0 comments Download
A + libadblockplus-android-webviewapp/project.properties View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
A libadblockplus-android-webviewapp/res/drawable/icon.png View Binary file 0 comments Download
A libadblockplus-android-webviewapp/res/layout/activity_main.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +75 lines, -0 lines 0 comments Download
A libadblockplus-android-webviewapp/res/values/strings.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +10 lines, -0 lines 0 comments Download
A libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/MainActivity.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +277 lines, -0 lines 0 comments Download
M libadblockplus-android/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M libadblockplus-android/build.gradle View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +21 lines, -61 lines 0 comments Download
M libadblockplus-android/jni/JniFilterEngine.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +20 lines, -0 lines 0 comments Download
M libadblockplus-android/jni/Utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M libadblockplus-android/jni/Utils.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download
M libadblockplus-android/pom.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +11 lines, -6 lines 0 comments Download
M libadblockplus-android/src/org/adblockplus/android/AndroidWebRequest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -143 lines 0 comments Download
M libadblockplus-android/src/org/adblockplus/android/Utils.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -83 lines 0 comments Download
M libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -0 lines 0 comments Download
M libadblockplus-android/src/org/adblockplus/libadblockplus/JniExceptionHandler.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
A libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +313 lines, -0 lines 0 comments Download
A + libadblockplus-android/src/org/adblockplus/libadblockplus/android/AndroidLogSystem.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +22 lines, -12 lines 0 comments Download
A + libadblockplus-android/src/org/adblockplus/libadblockplus/android/AndroidWebRequest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +16 lines, -28 lines 0 comments Download
A + libadblockplus-android/src/org/adblockplus/libadblockplus/android/Utils.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +54 lines, -1 line 0 comments Download
A pom.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +24 lines, -0 lines 0 comments Download
M settings.gradle View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 5
anton
https://codereview.adblockplus.org/29351744/diff/29351745/libadblockplus-android/build.gradle File libadblockplus-android/build.gradle (right): https://codereview.adblockplus.org/29351744/diff/29351745/libadblockplus-android/build.gradle#newcode31 libadblockplus-android/build.gradle:31: compileSdkVersion 19 `evaluateJavascript` in `AdblockWebView` requires android 19 min ...
Sept. 8, 2016, 1 p.m. (2016-09-08 13:00:12 UTC) #1
anton
Updated README https://codereview.adblockplus.org/29351744/diff/29353034/libadblockplus-android-webviewapp/res/layout/activity_main.xml File libadblockplus-android-webviewapp/res/layout/activity_main.xml (right): https://codereview.adblockplus.org/29351744/diff/29353034/libadblockplus-android-webviewapp/res/layout/activity_main.xml#newcode19 libadblockplus-android-webviewapp/res/layout/activity_main.xml:19: android:text="http://worddictionary.co.uk" i've used this site to test ...
Sept. 14, 2016, 11:49 a.m. (2016-09-14 11:49:16 UTC) #2
anton
I've implemented significant improvement (it saves about 1-2 seconds for each loading) - now loading ...
Sept. 20, 2016, 11:46 a.m. (2016-09-20 11:46:29 UTC) #3
anton
https://codereview.adblockplus.org/29351744/diff/29353579/libadblockplus-android/src/org/adblockplus/android/AdblockWebView.java File libadblockplus-android/src/org/adblockplus/android/AdblockWebView.java (right): https://codereview.adblockplus.org/29351744/diff/29353579/libadblockplus-android/src/org/adblockplus/android/AdblockWebView.java#newcode974 libadblockplus-android/src/org/adblockplus/android/AdblockWebView.java:974: domain = Utils.getDomain(url); "filterEngine->GetHostFromURL(url)" is not available in java ...
Sept. 20, 2016, 11:54 a.m. (2016-09-20 11:54:20 UTC) #4
anton
Sept. 30, 2016, 1:31 p.m. (2016-09-30 13:31:37 UTC) #5
https://codereview.adblockplus.org/29351744/diff/29355451/libadblockplus-andr...
File
libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/webviewapp/MainActivity.java
(right):

https://codereview.adblockplus.org/29351744/diff/29355451/libadblockplus-andr...
libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/webviewapp/MainActivity.java:82:
MainActivity.this.url.setText(url);
Philll asked for it for testing

https://codereview.adblockplus.org/29351744/diff/29355451/libadblockplus-andr...
File libadblockplus-android/src/org/adblockplus/android/AdblockWebView.java
(right):

https://codereview.adblockplus.org/29351744/diff/29355451/libadblockplus-andr...
libadblockplus-android/src/org/adblockplus/android/AdblockWebView.java:899: if
(Build.VERSION.SDK_INT >= 21)
Here we support both pre-21 and 21 with referrer (switching between impls)

Powered by Google App Engine
This is Rietveld