Loading core/java/android/annotation/AnyThread.java +16 −12 Original line number Diff line number Diff line Loading @@ -15,30 +15,34 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.SOURCE; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that the annotated method can be called from any thread (e.g. it is "thread safe".) * If the annotated element is a class, then all methods in the class can be called * from any thread. * Denotes that the annotated method can be called from any thread (e.g. it is * "thread safe".) If the annotated element is a class, then all methods in the * class can be called from any thread. * <p> * The main purpose of this method is to indicate that you believe a method can be called * from any thread; static tools can then check that nothing you call from within this method * or class have more strict threading requirements. * The main purpose of this method is to indicate that you believe a method can * be called from any thread; static tools can then check that nothing you call * from within this method or class have more strict threading requirements. * <p> * Example: * <pre><code> * * <pre> * <code> * @AnyThread * public void deliverResult(D data) { ... } * </code></pre> * </code> * </pre> * * {@hide} * @memberDoc This method is safe to call from any thread. * @hide */ @Retention(SOURCE) @Target({METHOD,CONSTRUCTOR,TYPE}) Loading core/java/android/annotation/CallSuper.java +11 −6 Original line number Diff line number Diff line Loading @@ -15,21 +15,26 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.SOURCE; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that any overriding methods should invoke this method as well. * <p> * Example: * <pre><code> * * <pre> * <code> * @CallSuper * public abstract void onFocusLost(); * </code></pre> * </code> * </pre> * * @memberDoc If you override this method you <em>must</em> call through to the * superclass implementation. * @hide */ @Retention(SOURCE) Loading core/java/android/annotation/MainThread.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,9 +15,6 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; Loading @@ -25,6 +22,9 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; import android.os.Looper; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * 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 Loading core/java/android/annotation/SuppressAutoDoc.java +7 −4 Original line number Diff line number Diff line Loading @@ -16,14 +16,17 @@ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.LOCAL_VARIABLE; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.SOURCE; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that any automatically generated documentation should be suppressed * for the annotated method, parameter, or field. Loading @@ -31,6 +34,6 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; * @hide */ @Retention(SOURCE) @Target({METHOD, PARAMETER, FIELD}) @Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE}) public @interface SuppressAutoDoc { } core/java/android/annotation/UiThread.java +18 −10 Original line number Diff line number Diff line Loading @@ -15,26 +15,34 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; 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; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that the annotated method or constructor should only be called on the UI thread. * If the annotated element is a class, then all methods in the class should be called * on the UI thread. * Denotes that the annotated method or constructor should only be called on the * UI thread. If the annotated element is a class, then all methods in the class * should be called on the UI thread. * <p> * Example: * <pre><code> * * <pre> * <code> * @UiThread * public abstract void setText(@NonNull String text) { ... } * </code></pre> * </code> * </pre> * * {@hide} * @memberDoc This method must be called on the thread that originally created * this UI element. This is typically the * {@linkplain Looper#getMainLooper() main thread} of your app. * @hide */ @Retention(SOURCE) @Target({METHOD,CONSTRUCTOR,TYPE}) Loading Loading
core/java/android/annotation/AnyThread.java +16 −12 Original line number Diff line number Diff line Loading @@ -15,30 +15,34 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.SOURCE; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that the annotated method can be called from any thread (e.g. it is "thread safe".) * If the annotated element is a class, then all methods in the class can be called * from any thread. * Denotes that the annotated method can be called from any thread (e.g. it is * "thread safe".) If the annotated element is a class, then all methods in the * class can be called from any thread. * <p> * The main purpose of this method is to indicate that you believe a method can be called * from any thread; static tools can then check that nothing you call from within this method * or class have more strict threading requirements. * The main purpose of this method is to indicate that you believe a method can * be called from any thread; static tools can then check that nothing you call * from within this method or class have more strict threading requirements. * <p> * Example: * <pre><code> * * <pre> * <code> * @AnyThread * public void deliverResult(D data) { ... } * </code></pre> * </code> * </pre> * * {@hide} * @memberDoc This method is safe to call from any thread. * @hide */ @Retention(SOURCE) @Target({METHOD,CONSTRUCTOR,TYPE}) Loading
core/java/android/annotation/CallSuper.java +11 −6 Original line number Diff line number Diff line Loading @@ -15,21 +15,26 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.SOURCE; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that any overriding methods should invoke this method as well. * <p> * Example: * <pre><code> * * <pre> * <code> * @CallSuper * public abstract void onFocusLost(); * </code></pre> * </code> * </pre> * * @memberDoc If you override this method you <em>must</em> call through to the * superclass implementation. * @hide */ @Retention(SOURCE) Loading
core/java/android/annotation/MainThread.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,9 +15,6 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; Loading @@ -25,6 +22,9 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; import android.os.Looper; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * 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 Loading
core/java/android/annotation/SuppressAutoDoc.java +7 −4 Original line number Diff line number Diff line Loading @@ -16,14 +16,17 @@ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.LOCAL_VARIABLE; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.SOURCE; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that any automatically generated documentation should be suppressed * for the annotated method, parameter, or field. Loading @@ -31,6 +34,6 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; * @hide */ @Retention(SOURCE) @Target({METHOD, PARAMETER, FIELD}) @Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE}) public @interface SuppressAutoDoc { }
core/java/android/annotation/UiThread.java +18 −10 Original line number Diff line number Diff line Loading @@ -15,26 +15,34 @@ */ package android.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; 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; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Denotes that the annotated method or constructor should only be called on the UI thread. * If the annotated element is a class, then all methods in the class should be called * on the UI thread. * Denotes that the annotated method or constructor should only be called on the * UI thread. If the annotated element is a class, then all methods in the class * should be called on the UI thread. * <p> * Example: * <pre><code> * * <pre> * <code> * @UiThread * public abstract void setText(@NonNull String text) { ... } * </code></pre> * </code> * </pre> * * {@hide} * @memberDoc This method must be called on the thread that originally created * this UI element. This is typically the * {@linkplain Looper#getMainLooper() main thread} of your app. * @hide */ @Retention(SOURCE) @Target({METHOD,CONSTRUCTOR,TYPE}) Loading