Class NoOpMainThreadChecker

java.lang.Object
io.sentry.util.thread.NoOpMainThreadChecker
All Implemented Interfaces:
IMainThreadChecker

@Internal public final class NoOpMainThreadChecker extends Object implements IMainThreadChecker
  • Constructor Details

    • NoOpMainThreadChecker

      public NoOpMainThreadChecker()
  • Method Details

    • getInstance

      public static NoOpMainThreadChecker getInstance()
    • isMainThread

      public boolean isMainThread(long threadId)
      Specified by:
      isMainThread in interface IMainThreadChecker
    • isMainThread

      public boolean isMainThread(@NotNull @NotNull Thread thread)
      Description copied from interface: IMainThreadChecker
      Checks if a given thread is the Main/UI thread
      Specified by:
      isMainThread in interface IMainThreadChecker
      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 interface IMainThreadChecker
      Returns:
      true if it is the main thread or false otherwise
    • isMainThread

      public boolean isMainThread(@NotNull @NotNull SentryThread sentryThread)
      Description copied from interface: IMainThreadChecker
      Checks if a given thread is the Main/UI thread
      Specified by:
      isMainThread in interface IMainThreadChecker
      Parameters:
      sentryThread - the SentryThread
      Returns:
      true if it is the main thread or false otherwise