code: private void checkThread() {
          if (Thread.currentThread() != thread) {
              throw new IllegalStateException("Don't cross-thread using the "
                      + Context.class.getName() + " object, it's thread-local only. context thread: "
                      + thread.getName() + ", current thread: " + Thread.currentThread().getName());
          }
      }
docs: Check the cross-thread use.