code: public static void doOnMainThread(final OnMainThreadJob onMainThreadJob) {
          uiHandler.post(new Runnable() {
              @Override
              public void run() {
                  onMainThreadJob.doInUIThread();
              }
          });
      }
docs: Executes the provided code immediately on the UI Thread
  @param onMainThreadJob Interface that wraps the code to execute