1 package com.android.volley.toolbox;
2 
3 import android.os.Looper;
4 
5 final class Threads {
Threads()6     private Threads() {}
7 
throwIfNotOnMainThread()8     static void throwIfNotOnMainThread() {
9         if (Looper.myLooper() != Looper.getMainLooper()) {
10             throw new IllegalStateException("Must be invoked from the main thread.");
11         }
12     }
13 }
14