sprockets/src/main/java/net/sf/sprockets/app/ui/SprocketsActivity.java
@UiThread
    public void postWhenResumed(Runnable action) {
        if (!mStateSaved) {
            if (mHandler == null) {
                mHandler = new Handler();
            }
            mHandler.post(action);
        } else {
            if (mPosts == null) {
                mPosts = new ArrayDeque<>();
            }
            mPosts.offer(action);
        }
    }
@UiThread
    public void postWhenResumed(Runnable action) {
        if (!mStateSaved) {
            if (mHandler == null) {
                mHandler = new Handler();
            }
            mHandler.post(action);
        } else {
            if (mPosts == null) {
                mPosts = new ArrayDeque<>();
            }
            mPosts.offer(action);
        }
    }
If {@link #onSaveInstanceState(Bundle) onSaveInstanceState} hasn't been called yet, post the
action now. Otherwise save the action and run it when the Activity resumes.