Package com.trimblemaps.mapsdk.utils
Class ThreadUtils
java.lang.Object
com.trimblemaps.mapsdk.utils.ThreadUtils
Utility class to verify if execution is running on the main thread.
Verification only runs for debug builds.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckThread(String origin) Validates if execution is running on the main thread.static ThreadUtilsinit(android.content.Context context) Initialises the thread utils, verifies debug state of the consuming app.static intwaitForEmpty(Object lock, ArrayList<Runnable> eventQueue, long timeoutMillis)
-
Constructor Details
-
ThreadUtils
public ThreadUtils()
-
-
Method Details
-
init
Initialises the thread utils, verifies debug state of the consuming app.- Parameters:
context- Context hosting the TrimbleMaps Maps SDK for Android- Returns:
- this
-
checkThread
Validates if execution is running on the main thread.- Parameters:
origin- the origin of the execution
-
waitForEmpty
-