diff options
| author | Selim Gurun <sgurun@google.com> | 2014-07-09 14:40:13 -0700 |
|---|---|---|
| committer | Selim Gurun <sgurun@google.com> | 2014-07-09 16:50:00 -0700 |
| commit | 7871554e1abe81d745a93c9a97f679f6617f906d (patch) | |
| tree | c46b7044febc8c78402a4d59ada461f1800be81b /core/java | |
| parent | 54f5884b3518d9650b3d91d6a9856e79e955a335 (diff) | |
| download | frameworks_base-7871554e1abe81d745a93c9a97f679f6617f906d.zip frameworks_base-7871554e1abe81d745a93c9a97f679f6617f906d.tar.gz frameworks_base-7871554e1abe81d745a93c9a97f679f6617f906d.tar.bz2 | |
Add an API to disable data reduction proxy.
Bug: 16011253
Under rare circumstances, the application may need to disable the
data reduction proxy. This is to provide a way to do that.
Change-Id: I031f689f9d72460c7241aec78459185e0b31f059
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 15 | ||||
| -rw-r--r-- | core/java/android/webkit/WebViewFactoryProvider.java | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 482c7e8..290a574 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -1805,6 +1805,21 @@ public class WebView extends AbsoluteLayout } /** + * Sets whether the application wants to opt out from using the Data Reduction Proxy + * service. + * Data reduction proxy can only be enabled by the user and will almost always be + * transparent to the application. In rare cases where using the proxy interferes + * with the app, the application developer can use this API to opt out from using the + * proxy. Note that this may increase network bandwidth usage. + * + * See <a href=http://developer.chrome.com/multidevice/data-compression> + * Data Compression Proxy</a> + */ + public static void optOutDataReductionProxy() { + getFactory().getStatics().optOutDataReductionProxy(); + } + + /** * Gets the list of currently loaded plugins. * * @return the list of currently loaded plugins diff --git a/core/java/android/webkit/WebViewFactoryProvider.java b/core/java/android/webkit/WebViewFactoryProvider.java index 6e6a987..5ff2655 100644 --- a/core/java/android/webkit/WebViewFactoryProvider.java +++ b/core/java/android/webkit/WebViewFactoryProvider.java @@ -59,6 +59,11 @@ public interface WebViewFactoryProvider { */ void clearClientCertPreferences(Runnable onCleared); + /** + * Implements the API method: + * {@link android.webkit.WebView#optOutDataReductionProxy() } + */ + void optOutDataReductionProxy(); } Statics getStatics(); |
