Process response bodies only when present

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
1 file changed