Age | Commit message (Collapse) | Author |
|
Change-Id: I83a538bb466b6fd7801961ef47952009bb0defdb
|
|
|
|
Change-Id: I6459f8ecf9f32411ca387631d1298a9ce1c6446b
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
A HTTP 304 response does not have all header fields.
We have to copy the header from the cache entry.
see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5
Change-Id: I197864ad4f2b103edc4a718afea2a35127b7c203
Signed-off-by: Ralph Bergmann <ralph@the4thfloor.eu>
|
|
Move the request into NetworkDispatcher's loop so that the previously
processed request's reference is not held until the next request
comes off the queue.
|
|
|
|
Add a public accessor for a Request's ErrorListener.
Change-Id: Ifd3b8f818dd0e9db0183f08321043aae7c92c72c
Signed-off-by: Shirish Kalele <kalele@google.com>
|
|
Using a BufferedInputStream significantly reduces the time it takes
to initialize the cache. On my Nexus 5 with ~330 files in cache init
time went from ~2s to ~0.5s with this change.
Change-Id: I3dd909e3235583306ff5943f69e3947a275bf968
Signed-off-by: Fabian Frank <fabian.frank.de@gmail.com>
|
|
This seems like the smallest change that will allow developers to
supply their own ImageRequest class to the ImageLoader without
changing the API. There are several use cases for supplying
custom ImageRequests, including setting custom headers, adjusting
the priority of ImageRequests, and working around Issue #71928.
Change-Id: Ic47452b5f8cada2491a6513cb56f383261c73c3a
|
|
DiskBasedCache.writeHeader() can throw an IOException and swallow it. This causes the
cache entry to be partially written followed by the entry's data. When reading back,
it is possible to read back the data segment (garbled part) when attempting to parse
the cache header.
Change-Id: I3022ca1566bc60e5869bb4ec384c866b4ba5c1c5
|
|
Just look at PUT and POST methods some lines above. The method is set
before calling to addBodyIfExists().
The method should be set before adding the body. Otherwise, some libraries will
try to establish a connection with the wrong method (GET by default).
Change-Id: I993a62cdc5cbccbf54f9bae4f6b183e2edf4304d
|
|
if request was canceled it will have already been removed
from mInFlightRequests and cause NPE
Change-Id: I1ce78bb6b3b2964545a47b5e3bb59bdf1a6d940e
|
|
occurring in Volley when a Request is given a url whose host is null.
Change-Id: Idab1dadaa43bb9176356028221cbdc0f8dd52cdc
|
|
Change-Id: If977c965c8ae3b4d00b958e65679e99a1d29a03a
|
|
|
|
Change-Id: Ib09a68c815f147ade31233d03267df687d8341e0
|
|
|
|
* Add null check to request.CacheEntry() when creating NetworkResponse.
Currently when cache is not used, rather than creating a valid
NetworkResponse object, BasicNetwork.performRequest() throws NPE when
processing a http 304 no modified response. The NetworkResponse object,
if returned with the Volley error, can be used by the volley caller to
determine the http status code.
Change-Id: I007468ed98fb7ed5719a94f871323466e1bd0f8a
|
|
This reverts commit 9e5c44f22b47fcb0d37c7b10de3b5db542424fa5.
Also, to run tests, the android:targetPackage in the
<instrumentation>needs to be set to
com.android.volley.tests (i.e., the volley_tests apk itself) because
volley is just a jar that is statically linked into the test apk.
Change-Id: I41ad41e401084b79fbf9712e24d7f7fdeb358223
|
|
Previously, if a default image was set, it would not be displayed
until a network load had begun. In some use cases where the load
would not be started until some arbitrary time in the future, this
would leave an empty image view visible to the user. This patch
checks to see if there is a default image set, and if so, uses that
to clear the view, so prior to loading, the defualt image will be
shown.
Change-Id: I6fcee408d95d708676d68f3f0bc7222e56570f39
|
|
Change-Id: I94313e2f89c38277d36b7a2aaa525862d2740c98
|
|
When we get an empty response for say, a 204, we create a 0 byte
response and pass it on to the NetworkResponse. Implementers
of Request can then return appropriate Responses. The behavior
before this change results in an NPE because we attempt to
getContentLength() bytes from a null entity..
Change-Id: Ia5f92ffd99b8f3e88cc92dc50ba43c4721d83e79
Signed-off-by: Ray Colline <rayc@google.com>
|
|
This will help the caller to debug which image couldn't be parsed by
peeking at the NetworkResponse. doParse() already returns the
NetworkResponse of bitmaps successfully parsed, adding it to failed bitmaps
should not take too much overhead.
|
|
This shouldn't have been executable.
Change-Id: Ib5c23ed853a99a4db55f1f2605528f4d9717ad24
|
|
1. getLayoutParams() can be null.
2. old version used LinearLayout.LayoutParams instead of ViewGroup.LayoutParams
|
|
To clean up the logs when multiple apps are using Volley, optionally
customize the VolleyLog tag so that the app has its own namespace.
Change-Id: I5b2129ab41bcfb7f309d324f696f905c98833551
|
|
Return "this" from the setter functions so that the methods can be
chained.
Change-Id: I5b03f1a9f265af451f5b1807347007569483b580
|
|
The standard Java serialization system relies heavily on
reflection, even for primitive types and Strings, which
generates a lot of garbage. Move to a simple built-in
implementation.
Change-Id: I7f35cbfd1963f2aaf726f5b747cef1b2f8a0ad69
|
|
Change-Id: I8106e5763df7e600c82c446b6ff828907fb187c1
|
|
|
|
|
|
If the first call to batchResponse passes a VolleyError,
then all responses from that batch would show an error even
if some of them succeeded. This fixes the bug by setting the
error per BatchedImageRequest rather than for the batch.
Change-Id: I2543d2d6f4154c33ba072d7f97aee9dc67f3300e
Signed-off-by: Cameron Ketcham <cketcham@gmail.com>
|
|
If the NIV is WRAP_CONTENT for both width / height,
skip the check that makes sure that it is measured before
fetching the image.
|
|
|
|
Change-Id: I771a608910a7b2b1dc1fe1d30395a7bb0738592e
|
|
|
|
|
|
Add a variant method that allows the user to pass in
an HttpStack to be passed to BasicNetwork. Makes using
alternative stacks like OkHttp easier.
|
|
This provides an easy insertion point for alternate implementations
of the HttpUrlConnection API (e.g., OkHttp).
Change-Id: I84482c7a66ce7106680d2efc9865743b8ecb0248
|
|
|
|
Store the ImageContainer in a member variable instead of in the tag
field (since the tag field buys us nothing, anyway).
|
|
|
|
Change-Id: I5a1454c7c8d1ed62953b9cdaa9871b8cb40b23a7
|
|
We found that Volley generated about 20 strings per cached item (~9000
strings for ~440 cached items) and most of these were duplicates. This
change interns the key and value strings to avoid duplication. This saved
about 500kb for our scenario (440 images cached.)
|
|
Since a caller might want AndroidAuthenticator to show a notification
instead of delivering an error, allow it to be specified.
Change-Id: I9232668f4e8e83b46da2c2fb1c678246c735f200
|
|
Allow Request subclasses to set their TrafficStats tags. By default,
this is the hostname's hashCode() so that requests to different hosts
have different colors in DDMS.
Change-Id: Ibedf06fdcee108dcd170f5eb70aaecea5647d55d
|
|
|
|
For POSTs and PUTs, HttpURLConnection requires that you set the method before
you write any body data. i.e. writing body data causes the socket to be
opened, at which point you can't set the method anymore. Volley was calling
these two methods in the wrong order; this fixes that.
Separately, this also adds a constructor and appropriate support for a
caller-provided SslSocketFactory. The use case for this is self-signed certs,
where a developer's app is is preloaded with the public key for a specific
server cert not signed by one of the usual CAs. The caller is responsible for
setting up the socket factory with an appropriate keystore, etc.
Change-Id: I2738ce956202b8a8508a733fc7f8b6600cd19bf5
|
|
|
|
Make sure that the cache folder exists when using DiskBasedCache.
Change-Id: I60e2c2b0b88c9a3a178e72dda05ab5f7290e33f0
|