Run background threads associated with filtering at background priority.

This improves the typing responsiveness in the browser a lot, and should
help out in all the other cases in the UI where we use a filter thread.
This commit is contained in:
Karl Rosaen
2009-07-15 10:09:56 -07:00
parent f770351931
commit ab3ef104cd

View File

@@ -85,7 +85,8 @@ public abstract class Filter {
public final void filter(CharSequence constraint, FilterListener listener) {
synchronized (mLock) {
if (mThreadHandler == null) {
HandlerThread thread = new HandlerThread(THREAD_NAME);
HandlerThread thread = new HandlerThread(
THREAD_NAME, android.os.Process.THREAD_PRIORITY_BACKGROUND);
thread.start();
mThreadHandler = new RequestHandler(thread.getLooper());
}