Add BaseMockResponse with two flavors.

Some tests rely on MockResponses being cloned as they're enqueued,
which doesn't mix well with the recent switch to using InputStream
to represent all bodies.

This change introduces a base class that handles common header
management, and two distinct flavors: MockResponse which returns to
using byte[] bodies, and MockStreamResponse which is InputStream
based.  MockResponse are again cloned when enqueued, making existing
tests happy.

Bug: 8334369
Change-Id: I12b83a06d17ba82d46166c5550397a2198ce68fd
4 files changed
tree: 09eaa075a5388911ca6daa206e9ed0d5392ffc7e
  1. src/
  2. Android.mk
  3. COPYING
  4. MODULE_LICENSE_APACHE2