diff options
| author | Matthew Gharrity <gharrma@google.com> | 2017-07-17 17:18:00 -0700 |
|---|---|---|
| committer | Matthew Gharrity <gharrma@google.com> | 2017-07-24 14:27:37 -0700 |
| commit | cb43616ad19657a6d94535ca0e9bfbc32f6b590d (patch) | |
| tree | 0eaece405006060a169fb43fc5c5f689b8ad9086 /core/java/android/annotation/MainThread.java | |
| parent | 1e2df08ade567f8be2db2f64b27c4d7670b8712f (diff) | |
Enable thread annotations for parameters
This allows us to indicate that an argument (especially a lambda or
method reference) will be invoked on a separate thread. This will be
used to improve interprocedural thread annotation checks.
Test: n/a
Change-Id: I035733f8bfb1ba47f0995f38783681d105661dc5
Diffstat (limited to 'core/java/android/annotation/MainThread.java')
| -rw-r--r-- | core/java/android/annotation/MainThread.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/annotation/MainThread.java b/core/java/android/annotation/MainThread.java index d15cfcd94ba7..556fdb4e7742 100644 --- a/core/java/android/annotation/MainThread.java +++ b/core/java/android/annotation/MainThread.java @@ -17,6 +17,7 @@ package android.annotation; import static java.lang.annotation.ElementType.CONSTRUCTOR; 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; @@ -44,6 +45,6 @@ import java.lang.annotation.Target; * @hide */ @Retention(SOURCE) -@Target({METHOD,CONSTRUCTOR,TYPE}) +@Target({METHOD,CONSTRUCTOR,TYPE,PARAMETER}) public @interface MainThread { } |
