Back to project page photo-paper.
The source code is released under:
MIT License
If you think the Android project photo-paper listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.lukekorth.android_500px.helpers; /* w w w .j ava 2 s . co m*/ import android.os.Handler; import android.os.Looper; import com.squareup.otto.Bus; public class ThreadBus extends Bus { private final Handler mainThread = new Handler(Looper.getMainLooper()); @Override public void post(final Object event) { if (Looper.myLooper() == Looper.getMainLooper()) { super.post(event); } else { mainThread.post(new Runnable() { @Override public void run() { ThreadBus.super.post(event); } }); } } }