From 4a06b68c82fc011d8cd780ed7f0393d1d0617a07 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Mon, 20 Jul 2009 08:55:06 -0400 Subject: [PATCH] Correctly set the thread priority for ConnectionThreads. This does not change the actual thread priority but if the default priority changes, this will have the desired result of being slightly less favorable. I tried messing with the priorities to see if a higher or lower priority helped but it seemed to do more harm than good. It might be worth more investigation to find out where all the thread time is being spent so we can determine the correct priority. --- core/java/android/net/http/ConnectionThread.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/net/http/ConnectionThread.java b/core/java/android/net/http/ConnectionThread.java index 1d0db2bc70d6c..0b30e589c4a71 100644 --- a/core/java/android/net/http/ConnectionThread.java +++ b/core/java/android/net/http/ConnectionThread.java @@ -69,6 +69,7 @@ class ConnectionThread extends Thread { */ public void run() { android.os.Process.setThreadPriority( + android.os.Process.THREAD_PRIORITY_DEFAULT + android.os.Process.THREAD_PRIORITY_LESS_FAVORABLE); // these are used to get performance data. When it is not in the timing,