Index: base/android/java/src/org/chromium/base/ThreadUtils.java |
diff --git a/base/android/java/src/org/chromium/base/ThreadUtils.java b/base/android/java/src/org/chromium/base/ThreadUtils.java |
index b827a0b6c0b49914cebdcfe8f357fec32fc2b915..70232c4ea139b2f1fba8d9145fb0d25f7e5042c5 100644 |
--- a/base/android/java/src/org/chromium/base/ThreadUtils.java |
+++ b/base/android/java/src/org/chromium/base/ThreadUtils.java |
@@ -123,6 +123,16 @@ public class ThreadUtils { |
} |
/** |
+ * Post the supplied Runnable to run on the main thread. The method will |
+ * not block, even if called on the UI thread. |
+ * |
+ * @param task The Runnable to run |
+ */ |
+ public static void postOnUiThread(Runnable r) { |
+ LazyHolder.sUiThreadHandler.post(r); |
+ } |
+ |
+ /** |
* Asserts that the current thread is running on the main thread. |
*/ |
public static void assertOnUiThread() { |