diff options
| author | 2016-04-13 08:14:55 +0000 | |
|---|---|---|
| committer | 2016-04-13 08:14:57 +0000 | |
| commit | 49a54366c11ed5ac887e6f897aa6ee5e4b86489c (patch) | |
| tree | d2db88c5a1773d69cfe5cb868e1dfaf61753aa61 | |
| parent | d0fae0d61d22608b4bfb0845e13ed9c07c5c5376 (diff) | |
| parent | 8d25697bf01faaf3a6bb8f9f3a0619437cacc22e (diff) | |
Merge "Synchronize access to the main looper" into nyc-dev
| -rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java index 9e50ee898769..3b882909698d 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java @@ -537,7 +537,7 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { * Note that while this can be called several time, the first call to {@link #cleanupThread()} * will do the clean-up, and make the thread unable to do further scene actions. */ - public static void prepareThread() { + public synchronized static void prepareThread() { // we need to make sure the Looper has been initialized for this thread. // this is required for View that creates Handler objects. if (Looper.myLooper() == null) { @@ -551,7 +551,7 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge { * Note that it doesn't matter how many times {@link #prepareThread()} was called, a single * call to this will prevent the thread from doing further scene actions */ - public static void cleanupThread() { + public synchronized static void cleanupThread() { // clean up the looper Looper_Accessor.cleanupThread(); } |