forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@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 patches from this 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 Change-Id: Ic1bf8f93ac2d697571272870e03d6d96b0534ea6 Reviewed-on: https://chromium-review.googlesource.com/c/1370183 Commit-Queue: Marcin Wiącek <marcin@mwiacek.com> Commit-Queue: agrieve <agrieve@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#616001}
- Loading branch information
1 parent
292508f
commit 0727fec
Showing
2 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters