Package io.sentry.util.thread
Class MainThreadChecker
java.lang.Object
io.sentry.util.thread.MainThreadChecker
- All Implemented Interfaces:
IMainThreadChecker
Class that checks if a given thread is the Main/UI thread. The Main thread is denoted by the
thread, where the `Sentry.init` method was called. If it was inited from a background thread,
then this class is wrong, but it's a best effort.
We're gonna educate people through the docs.
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.sentry.util.thread.IMainThreadChecker
isMainThread, isMainThread, isMainThread
-
Method Details
-
getInstance
-
isMainThread
public boolean isMainThread(long threadId) - Specified by:
isMainThread
in interfaceIMainThreadChecker
-