aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/android
AgeCommit message (Collapse)Author
2017-03-01Import of Volley from GitHub to AOSP.android-o-preview-1o-previewAnonymous
GitOrigin-RevId: bc67181a21ab41a7c6b4a4adbcb9935bff888622 Change-Id: I8c1fd9c4cb81acf443169506ce920f030e3ea31c
2016-12-27Add some missing @Deprecated annotations.Jeff Davidson
These should always go hand-in-hand with @deprecated Javadoc annotations. Change-Id: I0e54616d39777d43f9763a702ca0fbc381e6ed49
2016-12-09Fix NegativeArraySizeException in DiskBasedCache.streamToBytesShen Lin
Issue discussion can be found at https://groups.google.com/forum/#!topic/volley-users/0W-oI6za8VY
2016-03-10Retry more errors in Volley's BasicNetwork.Jeff Davidson
Always retry I/O errors while reading the HTTP response entity. Furthermore, if a client opts in, retry HTTP 500 errors indicating something went wrong on the server. This resolves a longstanding TODO to only throw a ServerError on 5xx errors by adding a ClientError for 4xx errors. For backwards compatibility, this extends ServerError. Note that Volley already may retry a request that reached the server if the connection times out, which means that lack of idempotency shouldn't be a concern here if it wasn't already. But if we wanted to be even safer, we could require clients to opt into the additional retry cases, at the cost of a somewhat more polluted API. Add unit tests for most failure scenarios. Bug: 23152983 Change-Id: I92cf35c66ccf98a1682adf41654afeb8634911db
2015-12-04Merge "Workaround for HttpURLConnection.getFollowRedirects() on M"Neil Fuller
am: 3b37453b1c * commit '3b37453b1c8a15265640cebf0973ef552e569d33': Workaround for HttpURLConnection.getFollowRedirects() on M
2015-12-02Workaround for HttpURLConnection.getFollowRedirects() on MNeil Fuller
HttpURLConnection.setFollowRedirects() has no effect on M due to a bug. This should be safe / a no-op on other releases. Bug: https://code.google.com/p/android/issues/detail?id=194495 Change-Id: Ie97861eba0560b63504662baa908f6a5856f68aa
2015-10-28Merge "Add API to get Auth Token Type used by authenticator." am: 708ade5a69Ficus Kirkpatrick
am: 96c4d0b9f5 * commit '96c4d0b9f58229b9dbba51f1776addedc66f4749': Add API to get Auth Token Type used by authenticator.
2015-10-27Add API to get Auth Token Type used by authenticator.oleksii stepanian
When using different auth protocols e.g. ClientLogin and OAuth2 it is important to know the type of the token in order to construct "Authorization" header. Currently we have to store auth token vaue/auth token type association elsewhere which makes it a subject for errors. Change-Id: I3b8c05672f5394ad806f257c9f6bb378ebf990d7
2015-10-08am 82462cd0: Make default timeout/retry/multiplier values publicTom Ye
* commit '82462cd0a0d7fa58d5497c39534380ad3987fdd1': Make default timeout/retry/multiplier values public
2015-10-08Make default timeout/retry/multiplier values publicTom Ye
Change-Id: Ia5681e2876999f75cea3e4f5f9ef223a06787d4e (cherry picked from commit 5d563ac2fab08f5e066c6fd6bbf012314be0bf8d)
2015-07-16Process response bodies only when presentJukka Zitting
Responses to HEAD requests and any informational (1xx), no content (204) and not modified (304) responses contain no bodies. This change skips the response.setEntity(entityFromConnection(connection)) call when dealing with such responses. This fixes a problem in BasicNetwork where a response without a body is detected by checking whether the entity is null. Bug: 176674 - volley java.lang.IllegalStateException: Content has not been provided Change-Id: I1b0ce77461ce5bedc7f6a53fd63311ea93ec5af0
2015-07-06Stop logging slow requests outside of debug logs.Ficus Kirkpatrick
This dumps the URL, which can contain PII.
2015-05-10Read from disk with a BufferedInputStream.Ficus Kirkpatrick
Missed a spot in the last commit. All disk I/O should now be buffered.
2015-05-08Use a BufferedOutputStream to write cache entries.Ficus Kirkpatrick
Turns out to be almost 20% faster in a simple benchmark.
2015-03-19Merge "Add support for all HTTP methods to JsonArrayRequest"Ficus Kirkpatrick
2015-03-19Add support for all HTTP methods to JsonArrayRequestJoris Bolsens
Change-Id: I6e89f69885a63d524c48b1dec54553d6e16edd48 Signed-off-by: Joris Bolsens <epicblood@gmail.com>
2015-03-11Modify header parser to handle must-revalidate.Dave Santoro
This flag indicates that the response must NOT be returned after the cache TTL has expired, but it does not mandate that the response should not be cached at all (which the code was doing previously). Change-Id: I61532f3aa8144c50dcee442dc30215bb81ada868
2015-03-06Fix broken DiskBasedCacheRalph Bergmann
Change-Id: Ia5db47122af11223b55845ef8423424a9cddbb21 Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
2015-03-06Merge "fix ImageLoader.getCacheKey()"Ficus Kirkpatrick
2015-03-06fix ImageLoader.getCacheKey()Ralph Bergmann
The ScaleType was missing. Change-Id: I57cba7cbf60df1e47ea9d8baf480765c6e39d821 Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
2015-03-06clean up a little bitRalph Bergmann
Change-Id: Ibbe796c05e406acd48a0d59090e6be746db24867 Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
2015-02-27Add a RequestFinishedListener to RequestQueue.Brett Chabot
Change-Id: I51a1beacea4e448e71b7e9c3ec580165d799994a
2015-02-20Merge "Change the default character encoding for JSON responses to UTF-8"Ficus Kirkpatrick
2015-02-19A little work on unit testing.Ficus Kirkpatrick
Add emma and mockito to the Maven build, and test a couple random things.
2015-02-17Add a backwards-compatible ImageRequest constructor.Ficus Kirkpatrick
Restores the API surface to before ScaleType was required.
2015-02-16Fix volley related build breakage.Narayan Kamath
(cherry picked from commit 46741f2f5165cbf3cdc0c51107e5ffff8002af5b) Change-Id: I6fc32971f03d7958a75250e14a7efdb0a12d8d30
2015-02-15Adds Cache-Control "stale-while-revalidate"Ralph Bergmann
Adds Cache-Control "stale-while-revalidate" header parsing for better server side cache entry expire setup. see: https://www.mnot.net/blog/2007/12/12/stale http://tools.ietf.org/html/rfc5861 https://groups.google.com/a/chromium.org/forum/m/#!msg/chromium-dev/zchogDvIYrY/ZqWSdt3LJdMJ Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu> Change-Id: I1b7baf9997d3a8a251d21631a11deb503e3a7461
2015-02-15Uses the "Last-Modified" header for "If-Modified-Since"Ralph Bergmann
Uses the "Last-Modified" header for "If-Modified-Since" see http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.3.4 Change-Id: I0f5e9b45f4f79d7c1b286e465f9750dcd71b6bfd Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
2015-01-20Change the default character encoding for JSON responses to UTF-8Zdeněk Kořán
According to RFC 7159 (Section 8.1), the default encoding of JSON should be UTF-8. Using ISO-8859-1 as default causes incompatibility with some JSON APIs (e.g. wrong interpretation of internationalized strings).
2014-12-15Use the view size and scale type to restrict NIV requests.Ralph Bergmann
Change-Id: I77e705c09937f78af746cd73b6e6d94fd4ee2a03
2014-12-05Migrate from Gradle to Maven.Ficus Kirkpatrick
- Restructure source to src/{main,test} style - Add pom.xml and update Android.mk - Migrate all tests to JUnit4 and Robolectric - RequestQueueTest is currently @Ignored as fixing it will involve more extensive refactoring. - Main library still builds in Gradle; tests do not Change-Id: I1edc53bb1a54f64d3e806e4572901295ef63e2ca