Commit 410e614c by tonihei Committed by Oliver Woodman

Run custom messages executed on playback thread immediately.

This ensures message order if multiple custom messages running on the
playback thread and direct player commands are called immedately after
each other.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179925852
parent f2bb2d27
......@@ -904,13 +904,17 @@ import java.util.Collections;
}
}
};
handler.post(
new Runnable() {
@Override
public void run() {
customMessageInfo.message.getHandler().post(handleMessageRunnable);
}
});
if (customMessageInfo.message.getHandler().getLooper() == handler.getLooper()) {
handleMessageRunnable.run();
} else {
handler.post(
new Runnable() {
@Override
public void run() {
customMessageInfo.message.getHandler().post(handleMessageRunnable);
}
});
}
}
private void resolveCustomMessagePositions() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment