Package io.sentry.util.thread
Class NoOpMainThreadChecker
java.lang.Object
io.sentry.util.thread.NoOpMainThreadChecker
- All Implemented Interfaces:
IMainThreadChecker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic NoOpMainThreadChecker
boolean
Checks if the calling/current thread is the Main/UI threadboolean
isMainThread
(long threadId) boolean
isMainThread
(@NotNull SentryThread sentryThread) Checks if a given thread is the Main/UI threadboolean
isMainThread
(@NotNull Thread thread) Checks if a given thread is the Main/UI thread
-
Constructor Details
-
NoOpMainThreadChecker
public NoOpMainThreadChecker()
-
-
Method Details
-
getInstance
-
isMainThread
public boolean isMainThread(long threadId) - Specified by:
isMainThread
in interfaceIMainThreadChecker
-
isMainThread
Description copied from interface:IMainThreadChecker
Checks if a given thread is the Main/UI thread- Specified by:
isMainThread
in interfaceIMainThreadChecker
- Parameters:
thread
- the Thread- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
public boolean isMainThread()Description copied from interface:IMainThreadChecker
Checks if the calling/current thread is the Main/UI thread- Specified by:
isMainThread
in interfaceIMainThreadChecker
- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
Description copied from interface:IMainThreadChecker
Checks if a given thread is the Main/UI thread- Specified by:
isMainThread
in interfaceIMainThreadChecker
- Parameters:
sentryThread
- the SentryThread- Returns:
- true if it is the main thread or false otherwise
-