Example usage for android.os Looper equals

List of usage examples for android.os Looper equals

Introduction

In this page you can find the example usage for android.os Looper equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:Main.java

public static boolean isUiThread() {
    final Looper myLooper = Looper.myLooper();
    final Looper mainLooper = Looper.getMainLooper(); // never null

    return mainLooper.equals(myLooper);
}