diff options
author | Dan Egnor <egnor@google.com> | 2009-05-18 17:59:55 -0700 |
---|---|---|
committer | Dan Egnor <egnor@google.com> | 2009-05-18 17:59:55 -0700 |
commit | 3c1664216d3754674534932716b41b69999d8013 (patch) | |
tree | 1b14ff2415ff2bfaec86aa61c16c31660c373fa8 /core/java/com/google | |
parent | 9d16d2072be18b1734c22cd58cd9a07af28ede41 (diff) | |
download | frameworks_base-3c1664216d3754674534932716b41b69999d8013.zip frameworks_base-3c1664216d3754674534932716b41b69999d8013.tar.gz frameworks_base-3c1664216d3754674534932716b41b69999d8013.tar.bz2 |
Qualify a type and add some explanatory comments.
Diffstat (limited to 'core/java/com/google')
-rw-r--r-- | core/java/com/google/android/net/GoogleHttpClient.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/com/google/android/net/GoogleHttpClient.java b/core/java/com/google/android/net/GoogleHttpClient.java index 25d0122..922f5be 100644 --- a/core/java/com/google/android/net/GoogleHttpClient.java +++ b/core/java/com/google/android/net/GoogleHttpClient.java @@ -73,7 +73,7 @@ public class GoogleHttpClient implements HttpClient { private final AndroidHttpClient mClient; private final ContentResolver mResolver; private final String mAppName, mUserAgent; - private final ThreadLocal mConnectionAllocated = new ThreadLocal<Boolean>(); + private final ThreadLocal<Boolean> mConnectionAllocated = new ThreadLocal<Boolean>(); /** * Create an HTTP client without SSL session persistence. @@ -153,6 +153,8 @@ public class GoogleHttpClient implements HttpClient { * Delegating wrapper for SocketFactory records when sockets are connected. * We use this to know whether a connection was created vs reused, to * gather per-app statistics about connection reuse rates. + * (Note, we record only *connection*, not *creation* of sockets -- + * what we care about is the network overhead of an actual TCP connect.) */ private class WrappedSocketFactory implements SocketFactory { private SocketFactory mDelegate; @@ -227,6 +229,8 @@ public class GoogleHttpClient implements HttpClient { } finally { // Record some statistics to the checkin service about the outcome. // Note that this is only describing execute(), not body download. + // We assume the database writes are much faster than network I/O, + // and not worth running in a background thread or anything. try { long elapsed = SystemClock.elapsedRealtime() - start; ContentValues values = new ContentValues(); |