@Documented
@Retention(value=CLASS)
@Target(value={METHOD,CONSTRUCTOR,TYPE,PARAMETER})
public @interface UiThread
Example:
@UiThread
public abstract void setText(@NonNull String text) { ... }
Note: Ordinarily, an app's UI thread is also the main thread. However, under special circumstances, an app's UI thread might not be its main thread; for more information, see Thread annotations.
MainThread