Yeah, I didn't find a branch in platform/frameworks/support <https://android-review.googlesource.com/#/projects/platform/frameworks/support,dashboards/default> with support-annotations:22.2.0 so I posted request here.
Now I've created two separate issues on b.android.com: - 176022: Annotate Threading annotations with @Documented annotation <https://code.google.com/p/android/issues/detail?id=176022&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars> - 176023: Annotate @RequiresPermission annotation with @Documented annotation <https://code.google.com/p/android/issues/detail?id=176023&thanks=176023&ts=1433547447> ---------- BTW, new annotations' names are not very consistent, I understand that nobody will change them now, but probably ADT team can take this feedback into account for future annotations/APIs. For example @CallSuper is okay, it's almost clearly says "Call super method/constructor", @CallSuperMethod will be better, but in case of constructor it'll look not very great. But at the same time Threading annotations are not so intuitive, every Threading annotation has dual meaning, for example: @MainThread — "This method works in Main Thread itself (no action should be done, like JFYI), call me from bg threads w/o worries!" and second meaning "This method MUST be called from the Main Thread". In current project we have custom @DontCallInMainThread annotation which is much more intuitive, so probably it will be better to rename @MainThread to @CallFromMainThread. @WorkerThread — it's even worse than @MainThread because first meaning that comes to mind is "This method works in some background thread itself, so I should be careful with passed params and probably make them Thread Safe or even immutable!) when the real meaning is "Call this method from worker (bg) thread, don't block the Ui!", so probably it will be better to rename @WorkerThread to @CallFromWorkerThread or @CallFromBackgroundThread. Also, I am sure that a LOT of developers don't understand difference between @MainThread and @UiThread, because in most of the cases MainThread is UiThread, but when application has multiple processes, each process will have it's own MainThread, but only one of the process will have MainThread which is also UiThread. So, may be you can add this information to the Javadoc of @MainThread and @UiThread annotations. It was JFYI, hope it'll help ADT team with designing new APIs. On Thursday, June 4, 2015 at 3:14:26 PM UTC+3, Jake Wharton wrote: > > You're better off filing a bug. They aren't sync'd out to AOSP yet or you > could just submit a CL. I'm adding it to @Nullable and @NonNull here: > http://r.android.com/151379 > > On Thu, Jun 4, 2015 at 5:48 AM Artem Zinnatullin <[email protected] > <javascript:>> wrote: > >> Hello, >> >> Can you please add @Documented annotation to some of the new annotations >> in Support-Annotations 22.2.0: >> >> @UiThread, @WorkerThread, @MainThread, @BinderThread and >> @RequiresPermission. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "adt-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
