private boolean isUiThread() {
    return Looper.getMainLooper().getThread() == Thread.currentThread();
  }
Records the RecordBuilderImpl, and verifies if required
core/src/main/java/com/facebook/testing/screenshot/internal/ScreenshotImpl.java