diff options
Diffstat (limited to 'core/java/android/annotation/MainThread.java')
| -rw-r--r-- | core/java/android/annotation/MainThread.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/java/android/annotation/MainThread.java b/core/java/android/annotation/MainThread.java index 52f8dfb2dbb1..c6ac30c5c5da 100644 --- a/core/java/android/annotation/MainThread.java +++ b/core/java/android/annotation/MainThread.java @@ -23,20 +23,27 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.SOURCE; +import android.os.Looper; + /** * Denotes that the annotated method should only be called on the main thread. - * If the annotated element is a class, then all methods in the class should be called - * on the main thread. + * If the annotated element is a class, then all methods in the class should be + * called on the main thread. * <p> * Example: - * <pre><code> + * + * <pre> + * <code> * @MainThread * public void deliverResult(D data) { ... } - * </code></pre> + * </code> + * </pre> * - * {@hide} + * @memberDoc This method must be called from the + * {@linkplain Looper#getMainLooper() main thread} of your app. + * @hide */ @Retention(SOURCE) @Target({METHOD,CONSTRUCTOR,TYPE}) public @interface MainThread { -}
\ No newline at end of file +} |
