@Test public void verifyDoesNotThrowOnMainThread() throws InterruptedException { AbstractDisposeOnMainThread.verifyMainThread(); }
public static void verifyMainThread() { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException( "Expected to be called on the main thread but was " + Thread.currentThread().getName()); } }
AbstractDisposeOnMainThread implements Disposable { public static void verifyMainThread() { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException( "Expected to be called on the main thread but was " + Thread.currentThread().getName()); } } }
AbstractDisposeOnMainThread implements Disposable { public static void verifyMainThread() { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException( "Expected to be called on the main thread but was " + Thread.currentThread().getName()); } }  }
AbstractDisposeOnMainThread implements Disposable { public static void verifyMainThread() { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException( "Expected to be called on the main thread but was " + Thread.currentThread().getName()); } }  static void verifyMainThread(); @Override final boolean isDisposed(); @Override final void dispose(); }
AbstractDisposeOnMainThread implements Disposable { public static void verifyMainThread() { if (Looper.myLooper() != Looper.getMainLooper()) { throw new IllegalStateException( "Expected to be called on the main thread but was " + Thread.currentThread().getName()); } }  static void verifyMainThread(); @Override final boolean isDisposed(); @Override final void dispose();  }