commit | a692fc441c8795cca82b136720a20b864fb4773b | [log] [tgz] |
---|---|---|
author | Marcin Wiacek <marcin@mwiacek.com> | Mon Jul 16 23:12:20 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jul 16 23:12:20 2018 |
tree | e01b395bb4da2bd42abe9d62043d2d71b1ea33aa | |
parent | 15c5456a8493381335ccc0fd80815f9ff77fa7cd [diff] |
@IntDef cleanup in the browser/java/contextualsearch (part 3) @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 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 Change-Id: I83ee6e6280999c9e2b51a0ea3b1cee3d030cfd3f Reviewed-on: https://chromium-review.googlesource.com/1128095 Reviewed-by: Donn Denman <donnd@chromium.org> Commit-Queue: Donn Denman <donnd@chromium.org> Commit-Queue: Marcin WiÄ…cek <marcin@mwiacek.com> Cr-Commit-Position: refs/heads/master@{#575468}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .