Skip to content

Commit

Permalink
[Snackbar] Solve lint error caused by @IntDef
Browse files Browse the repository at this point in the history
It seems like lint won't take both @IntDef and @IntRange into consideration at the same time. Just uses @IntRange to cover all possible values.

Resolves #1767

PiperOrigin-RevId: 424918785
  • Loading branch information
drchen authored and pekingme committed Jan 28, 2022
1 parent 2463946 commit 3cf23e4
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -181,8 +181,7 @@ public interface ContentViewCallback

/** @hide */
@RestrictTo(LIBRARY_GROUP)
@IntDef({LENGTH_INDEFINITE, LENGTH_SHORT, LENGTH_LONG})
@IntRange(from = 1)
@IntRange(from = LENGTH_INDEFINITE)
@Retention(RetentionPolicy.SOURCE)
public @interface Duration {}

Expand Down

0 comments on commit 3cf23e4

Please sign in to comment.