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