code: private void runInMainThread(Runnable runnable) {
          if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
              mHandler.post(runnable);
          } else {
              runnable.run();
          }
      }
docs: Be sure execute in main thread.
  
  @param runnable code