Skip to content

Commit 0af8921

Browse files
committed
[Internal] Add missing @retention(RetentionPolicy.SOURCE) to a few enum interfaces
PiperOrigin-RevId: 759661555 (cherry picked from commit 7bd56f5)
1 parent fdac68c commit 0af8921

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

lib/java/com/google/android/material/behavior/HideBottomViewOnScrollBehavior.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
import androidx.core.view.ViewCompat;
4343
import com.google.android.material.animation.AnimationUtils;
4444
import com.google.android.material.motion.MotionUtils;
45+
import java.lang.annotation.Retention;
46+
import java.lang.annotation.RetentionPolicy;
4547
import java.util.LinkedHashSet;
4648

4749
/**
@@ -108,6 +110,7 @@ public interface OnScrollStateChangedListener {
108110
*/
109111
@RestrictTo(LIBRARY_GROUP)
110112
@IntDef({STATE_SCROLLED_DOWN, STATE_SCROLLED_UP})
113+
@Retention(RetentionPolicy.SOURCE)
111114
public @interface ScrollState {}
112115

113116
@ScrollState private int currentState = STATE_SCROLLED_UP;

lib/java/com/google/android/material/behavior/HideViewOnScrollBehavior.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public interface OnScrollStateChangedListener {
131131
*/
132132
@RestrictTo(LIBRARY_GROUP)
133133
@IntDef({STATE_SCROLLED_OUT, STATE_SCROLLED_IN})
134+
@Retention(RetentionPolicy.SOURCE)
134135
public @interface ScrollState {}
135136

136137
@ScrollState private int currentState = STATE_SCROLLED_IN;

lib/java/com/google/android/material/tabs/TabLayout.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ public class TabLayout extends HorizontalScrollView {
259259

260260
/** @hide */
261261
@IntDef(value = {TAB_LABEL_VISIBILITY_UNLABELED, TAB_LABEL_VISIBILITY_LABELED})
262+
@Retention(RetentionPolicy.SOURCE)
262263
public @interface LabelVisibility {}
263264

264265
/**

0 commit comments

Comments
 (0)