Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.webkit; |
| 18 | |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 19 | import android.annotation.Nullable; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 20 | import android.annotation.UnsupportedAppUsage; |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 21 | |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 22 | import java.io.File; |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 23 | import java.io.IOException; |
| 24 | import java.io.InputStream; |
| 25 | import java.io.OutputStream; |
| 26 | import java.util.Map; |
| 27 | |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 28 | /** |
| 29 | * Manages the HTTP cache used by an application's {@link WebView} instances. |
| 30 | * @deprecated Access to the HTTP cache will be removed in a future release. |
| 31 | * @hide Since {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} |
| 32 | */ |
| 33 | // The class CacheManager provides the persistent cache of content that is |
| 34 | // received over the network. The component handles parsing of HTTP headers and |
| 35 | // utilizes the relevant cache headers to determine if the content should be |
| 36 | // stored and if so, how long it is valid for. Network requests are provided to |
| 37 | // this component and if they can not be resolved by the cache, the HTTP headers |
| 38 | // are attached, as appropriate, to the request for revalidation of content. The |
| 39 | // class also manages the cache size. |
| 40 | // |
| 41 | // CacheManager may only be used if your activity contains a WebView. |
| 42 | @Deprecated |
| 43 | public final class CacheManager { |
| 44 | /** |
| 45 | * Represents a resource stored in the HTTP cache. Instances of this class |
| 46 | * can be obtained by calling |
| 47 | * {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>))}. |
| 48 | * |
| 49 | * @deprecated Access to the HTTP cache will be removed in a future release. |
| 50 | */ |
| 51 | @Deprecated |
| 52 | public static class CacheResult { |
| 53 | // these fields are saved to the database |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 54 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 55 | int httpStatusCode; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 56 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 57 | long contentLength; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 58 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 59 | long expires; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 60 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 61 | String expiresString; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 62 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 63 | String localPath; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 64 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 65 | String lastModified; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 66 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 67 | String etag; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 68 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 69 | String mimeType; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 70 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 71 | String location; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 72 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 73 | String encoding; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 74 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 75 | String contentdisposition; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 76 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 77 | String crossDomain; |
| 78 | |
| 79 | // these fields are NOT saved to the database |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 80 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 81 | InputStream inStream; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 82 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 83 | OutputStream outStream; |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 84 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 85 | File outFile; |
| 86 | |
| 87 | /** |
| 88 | * Gets the status code of this cache entry. |
| 89 | * |
| 90 | * @return the status code of this cache entry |
| 91 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 92 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 93 | public int getHttpStatusCode() { |
| 94 | return httpStatusCode; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Gets the content length of this cache entry. |
| 99 | * |
| 100 | * @return the content length of this cache entry |
| 101 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 102 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 103 | public long getContentLength() { |
| 104 | return contentLength; |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Gets the path of the file used to store the content of this cache |
| 109 | * entry, relative to the base directory of the cache. See |
| 110 | * {@link CacheManager#getCacheFileBaseDir CacheManager.getCacheFileBaseDir()}. |
| 111 | * |
| 112 | * @return the path of the file used to store this cache entry |
| 113 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 114 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 115 | public String getLocalPath() { |
| 116 | return localPath; |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Gets the expiry date of this cache entry, expressed in milliseconds |
| 121 | * since midnight, January 1, 1970 UTC. |
| 122 | * |
| 123 | * @return the expiry date of this cache entry |
| 124 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 125 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 126 | public long getExpires() { |
| 127 | return expires; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Gets the expiry date of this cache entry, expressed as a string. |
| 132 | * |
| 133 | * @return the expiry date of this cache entry |
| 134 | * |
| 135 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 136 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 137 | public String getExpiresString() { |
| 138 | return expiresString; |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * Gets the date at which this cache entry was last modified, expressed |
| 143 | * as a string. |
| 144 | * |
| 145 | * @return the date at which this cache entry was last modified |
| 146 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 147 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 148 | public String getLastModified() { |
| 149 | return lastModified; |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Gets the entity tag of this cache entry. |
| 154 | * |
| 155 | * @return the entity tag of this cache entry |
| 156 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 157 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 158 | public String getETag() { |
| 159 | return etag; |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Gets the MIME type of this cache entry. |
| 164 | * |
| 165 | * @return the MIME type of this cache entry |
| 166 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 167 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 168 | public String getMimeType() { |
| 169 | return mimeType; |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Gets the value of the HTTP 'Location' header with which this cache |
| 174 | * entry was received. |
| 175 | * |
| 176 | * @return the HTTP 'Location' header for this cache entry |
| 177 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 178 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 179 | public String getLocation() { |
| 180 | return location; |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * Gets the encoding of this cache entry. |
| 185 | * |
| 186 | * @return the encoding of this cache entry |
| 187 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 188 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 189 | public String getEncoding() { |
| 190 | return encoding; |
| 191 | } |
| 192 | |
| 193 | /** |
| 194 | * Gets the value of the HTTP 'Content-Disposition' header with which |
| 195 | * this cache entry was received. |
| 196 | * |
| 197 | * @return the HTTP 'Content-Disposition' header for this cache entry |
| 198 | * |
| 199 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 200 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 201 | public String getContentDisposition() { |
| 202 | return contentdisposition; |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Gets the input stream to the content of this cache entry, to allow |
| 207 | * content to be read. See |
| 208 | * {@link CacheManager#getCacheFile CacheManager.getCacheFile(String, Map<String, String>)}. |
| 209 | * |
| 210 | * @return an input stream to the content of this cache entry |
| 211 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 212 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 213 | public InputStream getInputStream() { |
| 214 | return inStream; |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * Gets an output stream to the content of this cache entry, to allow |
| 219 | * content to be written. See |
| 220 | * {@link CacheManager#saveCacheFile CacheManager.saveCacheFile(String, CacheResult)}. |
| 221 | * |
| 222 | * @return an output stream to the content of this cache entry |
| 223 | */ |
| 224 | // Note that this is always null for objects returned by getCacheFile()! |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 225 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 226 | public OutputStream getOutputStream() { |
| 227 | return outStream; |
| 228 | } |
| 229 | |
| 230 | |
| 231 | /** |
| 232 | * Sets an input stream to the content of this cache entry. |
| 233 | * |
| 234 | * @param stream an input stream to the content of this cache entry |
| 235 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 236 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 237 | public void setInputStream(InputStream stream) { |
| 238 | this.inStream = stream; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * Sets the encoding of this cache entry. |
| 243 | * |
| 244 | * @param encoding the encoding of this cache entry |
| 245 | */ |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 246 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 247 | public void setEncoding(String encoding) { |
| 248 | this.encoding = encoding; |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * @hide |
| 253 | */ |
| 254 | public void setContentLength(long contentLength) { |
| 255 | this.contentLength = contentLength; |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | /** |
| 260 | * Gets the base directory in which the files used to store the contents of |
| 261 | * cache entries are placed. See |
| 262 | * {@link CacheManager.CacheResult#getLocalPath CacheManager.CacheResult.getLocalPath()}. |
| 263 | * |
| 264 | * @return the base directory of the cache |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 265 | * @deprecated This method no longer has any effect and always returns {@code null}. |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 266 | */ |
| 267 | @Deprecated |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 268 | @Nullable |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 269 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 270 | public static File getCacheFileBaseDir() { |
| 271 | return null; |
| 272 | } |
| 273 | |
| 274 | /** |
| 275 | * Gets whether the HTTP cache is disabled. |
| 276 | * |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 277 | * @return {@code true} if the HTTP cache is disabled |
| 278 | * @deprecated This method no longer has any effect and always returns {@code false}. |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 279 | */ |
| 280 | @Deprecated |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 281 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 282 | public static boolean cacheDisabled() { |
| 283 | return false; |
| 284 | } |
| 285 | |
| 286 | /** |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 287 | * Starts a cache transaction. Returns {@code true} if this is the only running |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 288 | * transaction. Otherwise, this transaction is nested inside currently |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 289 | * running transactions and {@code false} is returned. |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 290 | * |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 291 | * @return {@code true} if this is the only running transaction |
| 292 | * @deprecated This method no longer has any effect and always returns {@code false}. |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 293 | */ |
| 294 | @Deprecated |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 295 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 296 | public static boolean startCacheTransaction() { |
| 297 | return false; |
| 298 | } |
| 299 | |
| 300 | /** |
| 301 | * Ends the innermost cache transaction and returns whether this was the |
| 302 | * only running transaction. |
| 303 | * |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 304 | * @return {@code true} if this was the only running transaction |
| 305 | * @deprecated This method no longer has any effect and always returns {@code false}. |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 306 | */ |
| 307 | @Deprecated |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 308 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 309 | public static boolean endCacheTransaction() { |
| 310 | return false; |
| 311 | } |
| 312 | |
| 313 | /** |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 314 | * Gets the cache entry for the specified URL, or {@code null} if none is found. |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 315 | * If a non-null value is provided for the HTTP headers map, and the cache |
| 316 | * entry needs validation, appropriate headers will be added to the map. |
| 317 | * The input stream of the CacheEntry object should be closed by the caller |
| 318 | * when access to the underlying file is no longer required. |
| 319 | * |
| 320 | * @param url the URL for which a cache entry is requested |
| 321 | * @param headers a map from HTTP header name to value, to be populated |
| 322 | * for the returned cache entry |
| 323 | * @return the cache entry for the specified URL |
Nate Fischer | 0a6140d | 2017-09-05 12:37:49 -0700 | [diff] [blame] | 324 | * @deprecated This method no longer has any effect and always returns {@code null}. |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 325 | */ |
| 326 | @Deprecated |
Nate Fischer | 3442c74 | 2017-09-08 17:02:00 -0700 | [diff] [blame] | 327 | @Nullable |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 328 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 329 | public static CacheResult getCacheFile(String url, |
| 330 | Map<String, String> headers) { |
| 331 | return null; |
| 332 | } |
| 333 | |
| 334 | /** |
| 335 | * Adds a cache entry to the HTTP cache for the specicifed URL. Also closes |
| 336 | * the cache entry's output stream. |
| 337 | * |
| 338 | * @param url the URL for which the cache entry should be added |
| 339 | * @param cacheResult the cache entry to add |
| 340 | * @deprecated Access to the HTTP cache will be removed in a future release. |
| 341 | */ |
| 342 | @Deprecated |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 343 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 344 | public static void saveCacheFile(String url, CacheResult cacheResult) { |
| 345 | saveCacheFile(url, 0, cacheResult); |
| 346 | } |
| 347 | |
Mathew Inwood | 42afea2 | 2018-08-16 19:18:28 +0100 | [diff] [blame] | 348 | @UnsupportedAppUsage |
Jonathan Dixon | 74fc73f | 2013-10-18 16:51:53 -0700 | [diff] [blame] | 349 | static void saveCacheFile(String url, long postIdentifier, |
| 350 | CacheResult cacheRet) { |
| 351 | try { |
| 352 | cacheRet.outStream.close(); |
| 353 | } catch (IOException e) { |
| 354 | return; |
| 355 | } |
| 356 | |
| 357 | // This method is exposed in the public API but the API provides no |
| 358 | // way to obtain a new CacheResult object with a non-null output |
| 359 | // stream ... |
| 360 | // - CacheResult objects returned by getCacheFile() have a null |
| 361 | // output stream. |
| 362 | // - new CacheResult objects have a null output stream and no |
| 363 | // setter is provided. |
| 364 | // Since this method throws a null pointer exception in this case, |
| 365 | // it is effectively useless from the point of view of the public |
| 366 | // API. |
| 367 | // |
| 368 | // With the Chromium HTTP stack we continue to throw the same |
| 369 | // exception for 'backwards compatibility' with the Android HTTP |
| 370 | // stack. |
| 371 | // |
| 372 | // This method is not used from within this package, and for public API |
| 373 | // use, we should already have thrown an exception above. |
| 374 | assert false; |
| 375 | } |
| 376 | } |