Skip to content

Commit 3cf23e4

Browse files
drchenpekingme
authored andcommitted
[Snackbar] Solve lint error caused by @IntDef
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
1 parent 2463946 commit 3cf23e4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/java/com/google/android/material/snackbar/BaseTransientBottomBar.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ public interface ContentViewCallback
181181

182182
/** @hide */
183183
@RestrictTo(LIBRARY_GROUP)
184-
@IntDef({LENGTH_INDEFINITE, LENGTH_SHORT, LENGTH_LONG})
185-
@IntRange(from = 1)
184+
@IntRange(from = LENGTH_INDEFINITE)
186185
@Retention(RetentionPolicy.SOURCE)
187186
public @interface Duration {}
188187

0 commit comments

Comments
 (0)