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
3 files changed
tree: f0aac96c3227590923594cc4e9d43dcd10d4bfcf
  1. src/
  2. Android.mk
  3. COPYING
  4. MODULE_LICENSE_APACHE2