Initial commit of volley (from frameworks/support)

Change-Id: I12ada622c3885da6994cc2ff40cd275e1d5311e2
Initial commit of volley (from frameworks/support)

Change-Id: I62581a4b1ed5c9cb57204ff12cbe7ddff7b490f6
Initial commit of volley (from frameworks/support)

Change-Id: Ie583820dcd5f281db7b9845f0c78774e1863afd3
Pass exception to android.util.Log

When using VolleyLog, add method overloads which allow the original
exception to be passed through to the underlying Android Log class.

Also update NetworkDispatcher to use the new method.

Change-Id: I0f48cf65c9af3e96e9e8e871665d3e68027d808f
Add a convenience method for creating RequestQueue

To cut down on the amount of boilerplate code required to get a
RequestQueue created and started, provide a factory method which
returns a started RequestQueue object (initialized with defaults).

Change-Id: I8babdc18b103f401782ad7f9666e035e884519f6
Fix a bad cherry-pick

Move Volley.java into the correct source path (recovering from a bad
cherry-pick).

Change-Id: Ia085bd8de8c6965ec41fd8c03c217d4c56a07e11
Treat NO_CONTENT (204) responses as successful

Change-Id: I23da370c9b144326a36b7cd5ebde1cc0796bdb68
Add in additional http request types

Specifically, these are HEAD, OPTIONS, TRACE, and PATCH.

Change-Id: Ie33fdc059ca7bb0658de7e270e2af56f54a00481
Revert "Add in additional http request types"

This seems to have caused a regression with account sign-up.

This reverts commit bece5836e16897df162e4f4db302b6eb14ac71b2

Change-Id: I019f98b984e496558e1830fec4d810fd589652db
Ensure that the cache folder exists

Make sure that the cache folder exists when using DiskBasedCache.

Change-Id: I60e2c2b0b88c9a3a178e72dda05ab5f7290e33f0
Move directory creation off the main thread.
Fix a bug in POSTs & support SslSocketFactories.

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
Add TrafficStats integration

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
Allow callers to set value of notifyAuthFailure

Since a caller might want AndroidAuthenticator to show a notification
instead of delivering an error, allow it to be specified.

Change-Id: I9232668f4e8e83b46da2c2fb1c678246c735f200
Add an Ant build rule

In order to avoid having to check out a large portion of the Android
framework, allow Volley to be self-contained (and built using the
existing Android application build system).

Change-Id: I45a23b98a2008ad707532da31f1e9b75c7071c25
Intern CacheHeader keys and values to avoid string duplication

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.)
Add ImageLoader and NetworkImageView convenience classes

Change-Id: I5a1454c7c8d1ed62953b9cdaa9871b8cb40b23a7
Don't trample on the user-supplied tag

Store the ImageContainer in a member variable instead of in the tag
field (since the tag field buys us nothing, anyway).
Don't requestLayout in layout pass in NIV
Allow override point for connection creation.

This provides an easy insertion point for alternate implementations
of the HttpUrlConnection API (e.g., OkHttp).

Change-Id: I84482c7a66ce7106680d2efc9865743b8ecb0248