Merge "OkHttp: Drop leak warning message that may not be the app's fault." am: e20a0af1b0 am: 08574818fd
am: 33f5ffc3f3

Change-Id: I8db89a99a6211a10dc3ba3d7801cd415df3c0806
diff --git a/okhttp/src/main/java/com/squareup/okhttp/ConnectionPool.java b/okhttp/src/main/java/com/squareup/okhttp/ConnectionPool.java
index 6f8efc4..4819ba6 100644
--- a/okhttp/src/main/java/com/squareup/okhttp/ConnectionPool.java
+++ b/okhttp/src/main/java/com/squareup/okhttp/ConnectionPool.java
@@ -301,9 +301,13 @@
         continue;
       }
 
-      // We've discovered a leaked allocation. This is an application bug.
-      Internal.logger.warning("A connection to " + connection.getRoute().getAddress().url()
-          + " was leaked. Did you forget to close a response body?");
+      // Android-removed: Drop warning about a leak that may not be the app's fault.
+      // We can't tell here whether the app accessed the response body (InputStream) or
+      // only the header fields; at least in the latter case, the app has done nothing
+      // wrong so we shouldn't warn. http://b/64789755
+      // // We've discovered a leaked allocation. This is an application bug.
+      // Internal.logger.warning("A connection to " + connection.getRoute().getAddress().url()
+      //      + " was leaked. Did you forget to close a response body?");
       references.remove(i);
       connection.noNewStreams = true;