summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2014-05-16 08:54:07 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2014-05-16 08:54:07 -0700
commit4064af844ca6e58dc2908525634c13c4be277eac (patch)
tree30fdba48bb89f1c9aa2af7228e84e0e486071d53 /core
parent7a91a7434af6542486466b88ad0bc8860fd1c594 (diff)
downloadframeworks_base-4064af844ca6e58dc2908525634c13c4be277eac.zip
frameworks_base-4064af844ca6e58dc2908525634c13c4be277eac.tar.gz
frameworks_base-4064af844ca6e58dc2908525634c13c4be277eac.tar.bz2
Clean up when we switch networks.
Need to unhitch mNetworkForRequestId when a network is no longer satisfying a request. Change-Id: I3b3cde7dd92ec87a76ae7a0825ad22e892fa8fd5
Diffstat (limited to 'core')
-rw-r--r--core/java/android/net/NetworkAgent.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 4b85398..c2b06a2 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -66,6 +66,7 @@ public abstract class NetworkAgent extends Handler {
private AsyncChannel mAsyncChannel;
private final String LOG_TAG;
private static final boolean DBG = true;
+ private static final boolean VDBG = true;
// TODO - this class shouldn't cache data or it runs the risk of getting out of sync
// Make the API require each of these when any is updated so we have the data we need,
// without caching.
@@ -266,11 +267,14 @@ public abstract class NetworkAgent extends Handler {
*/
private void evalScores() {
if (mConnectionRequested) {
+ if (VDBG) log("evalScores - already trying - size=" + mNetworkRequests.size());
// already trying
return;
}
+ if (VDBG) log("evalScores!");
for (int i=0; i < mNetworkRequests.size(); i++) {
int score = mNetworkRequests.valueAt(i).score;
+ if (VDBG) log(" checking request Min " + score + " vs my score " + mNetworkScore);
if (score < mNetworkScore) {
// have a request that has a lower scored network servicing it
// (or no network) than we could provide, so lets connect!