Android code should not assume main thread == UI thread.

Bug 10932261

Originally from http://crrev.com/25092005/ PS9, but modified to land
in klp-dev.

Original Description:
[Android] Android code should not assume main thread == UI thread.

Although typically the case, the main thread of an android app is not
necessarily the thread in which the View is hosted (the Android "UI"
thread). Update base.ThreadUtils to be able to specify a non-main thread
UI thread, and update places in the code that make this assumption to
use the refactored ThreadUtils class.

Change-Id: Ie2967fedafcece90f4e65b52a84bdd21f6b745cd
10 files changed