Skip to content

Instantly share code, notes, and snippets.

View otw's full-sized avatar

Stephan Linzner otw

  • Google
  • San Francisco
View GitHub Profile
public static void checkUIThread()
{
if (Looper.myLooper() != null && Looper.myLooper() == Looper.getMainLooper())
{
throw new IllegalStateException("Running on UI Thread");
}
}