Replace classes & enum with @IntDef/@StringDef |
|||
Issue description@IntDef/@StringDef annotation are preferred way for declaring set of String/int values. 1. they need less space in APK than enum, see https://developer.android.com/topic/performance/reduce-apk-size#remove-enums 2. they give more control over allowed values than "static final" values Main goal of patch series is writing "static final" values, enum and some classes in one common @IntDef/@StringDef form: 1. with @IntDef/@StringDef first, @Retention second and related @interface third 2. with values inside @interface 3. with NUM_ENTRIES declaring number of entries if necessary 4. with comment about numbering from 0 without gaps when necessary 5. with @Retention(RetentionPolicy.SOURCE) 6. without "static final" in the @interface
,
Jan 7
For the record: 1) Wider discussion of this topic is on this discussion thread: https://groups.google.com/a/chromium.org/forum/#!searchin/chromium-dev/intdef%7Csort:date/chromium-dev/DebQtiN5kMM/WuRsXrqBEgAJ 2) There are LOTS of changes that should have been listed under this bug. One example here: https://chromium-review.googlesource.com/1137217
,
Jan 8
Other related changes: https://chromium-review.googlesource.com/q/owner:marcin%2540mwiacek.com+IntDef (which are already closed and their history cannot be updated in git tree) donnd@, you added yourself to https://chromium-review.googlesource.com/c/chromium/src/+/1142764 and added mdjones@ to our discussion - 1142764 is formally perfect now and blocking it with "-1" because in the past something was not done with other CLs, looks potentially like potential biased action (I mean: it has totally different meaning that showing respect to my work in peaceful and constructive discussion)
,
Jan 8
https://chromium-review.googlesource.com/c/chromium/src/+/1142764 is probably one of last and I will just kindly ask for review.
,
Jan 8
> Other related changes... Marcin, Thanks for working to backfill this bug! I think this search might be better since it includes other people's changes that address this IntDef issue: https://chromium-review.googlesource.com/q/%2540intdefhttps://chromium-review.googlesource.com/q/%2540intdef BTW, I don't understand a lot of your comment in #3. Are you saying that CL 1142764 is now ready for review? Normally this is done in the CL itself by issuing a polite request there, e.g. "Please take another look, I think I have addressed all outstanding issues".
,
Jan 8
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mar...@mwiacek.com
, Jan 7