Beispiel #1
0
 public static Scheduler getUiThreadScheduler() {
   return shadowOf(Looper.getMainLooper()).getScheduler();
 }
Beispiel #2
0
 public static void assertMainThread() {
   if (Looper.myLooper() != Looper.getMainLooper()) {
     throw new RuntimeException();
   }
 }