mockwebserver only needs to depend on core.jar

Change-Id: I0b6ec193ff35b25b102f3f9287a951bdc77bd7c4
Merge "mockwebserver only needs to depend on core.jar"
Track upstream changes to mockwebserver.

This removes the MockStreamResponse class, replacing it with the
previous MockResponse class. The MockStreamResponse class added
too much to the MockWebServer API for too little benefit: the
BaseResponse class wasn't 'public' but it was required to be public
API for callers to call MockWebServer.enqueue(). This approach is
less object-oriented, but also a lot smaller.

Change-Id: I8496fc3c4dcbfaaf6cd5e97f06d2786b49fa51e1
Merge "Track upstream changes to mockwebserver."
Do not allow MockWebServer to be played more than once

Change-Id: Ib525b71e6addec7cd83a8cde065f958b04024933
Merge "Do not allow MockWebServer to be played more than once"
Add bookkeeping requests to the request queue.

We'd never add requests which corresponded to
DISCONNECT_AT_START and FAIL_HANDSHAKE to the list of
received requests. This allows tests to determine whether
fallback requests were made or not.

While we're here, tidy up RecordedRequest#toString. It would
return "null" for bookkeeping requests and produce test outputs
like "expected <null> but was null".

Fixes CTS test URLConnectionTest#testSslFallback

(cherry picked from a4a53d9c9bf86165a5e2bd9ce4bcb834f09d)

bug: 10211309

Change-Id: I2ee1b523faf5c1b3387f5ca9f9ad19c0877e1ad5
Add new socket mode DISCONNECT_AFTER_READING_REQUEST

Useful for writing tests related to POST requests with
retryable and unretryable bodies.

(cherry picked from 3088bcc1d22f3e163e5e7ecbc997daadfdaaeec3)

bug: 10211309

Change-Id: Icb042d5875c4651348103be4eed7a2e248449b52
Merge tag 'tags/android-4.4_r1' into kitkat-staging

Android 4.4 Release 1.0