66import android .view .View ;
77import android .widget .ImageView ;
88
9- import androidx .annotation .IntDef ;
109import androidx .annotation .NonNull ;
1110import androidx .annotation .Nullable ;
1211import androidx .core .graphics .BitmapCompat ;
1615import org .schabi .newpipe .R ;
1716import org .schabi .newpipe .util .DeviceUtils ;
1817
19- import java .lang .annotation .Retention ;
2018import java .util .function .IntSupplier ;
2119
22- import static java .lang .annotation .RetentionPolicy .SOURCE ;
2320import static org .schabi .newpipe .player .seekbarpreview .SeekbarPreviewThumbnailHelper .SeekbarPreviewThumbnailType .HIGH_QUALITY ;
2421import static org .schabi .newpipe .player .seekbarpreview .SeekbarPreviewThumbnailHelper .SeekbarPreviewThumbnailType .LOW_QUALITY ;
2522import static org .schabi .newpipe .player .seekbarpreview .SeekbarPreviewThumbnailHelper .SeekbarPreviewThumbnailType .NONE ;
@@ -38,21 +35,19 @@ private SeekbarPreviewThumbnailHelper() {
3835 // No impl pls
3936 }
4037
41- @ Retention (SOURCE )
42- @ IntDef ({HIGH_QUALITY , LOW_QUALITY ,
43- NONE })
44- public @interface SeekbarPreviewThumbnailType {
45- int HIGH_QUALITY = 0 ;
46- int LOW_QUALITY = 1 ;
47- int NONE = 2 ;
38+
39+ public enum SeekbarPreviewThumbnailType {
40+ HIGH_QUALITY ,
41+ LOW_QUALITY ,
42+ NONE ,
4843 }
4944
5045 ////////////////////////////////////////////////////////////////////////////
5146 // Settings Resolution
5247 ///////////////////////////////////////////////////////////////////////////
5348
54- @ SeekbarPreviewThumbnailType
55- public static int getSeekbarPreviewThumbnailType ( @ NonNull final Context context ) {
49+ public static SeekbarPreviewThumbnailType getSeekbarPreviewThumbnailType (
50+ @ NonNull final Context context ) {
5651 final String type = PreferenceManager .getDefaultSharedPreferences (context ).getString (
5752 context .getString (R .string .seekbar_preview_thumbnail_key ), "" );
5853 if (type .equals (context .getString (R .string .seekbar_preview_thumbnail_none ))) {
0 commit comments