Android UI Thread Check isUIThread(Context context)

Here you can find the source of isUIThread(Context context)

Description

is UI Thread

Declaration

public static boolean isUIThread(Context context) 

Method Source Code

//package com.java2s;

import android.content.Context;

public class Main {
    public static boolean isUIThread(Context context) {
        return Thread.currentThread().equals(
                context.getMainLooper().getThread());
    }//from www.  j a v  a  2  s  .  c om
}