aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/android/volley/toolbox/Threads.java
blob: 66c3e418057e697002f3d9545733560a45e6754d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package com.android.volley.toolbox;

import android.os.Looper;

final class Threads {
    private Threads() {}

    static void throwIfNotOnMainThread() {
        if (Looper.myLooper() != Looper.getMainLooper()) {
            throw new IllegalStateException("Must be invoked from the main thread.");
        }
    }
}