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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user