public static void checkMainThread(){
  checkState(sIsMainThread.get(),"Not main thread.");
}

public static void checkMainThread ( ) { checkState ( sIsMainThread . get ( ) , "Not main thread." ) ; }
asserts that the current thread is the main thread .
