Fix depricated issues

This commit is contained in:
h4h13 2020-03-01 17:35:43 +05:30
parent 98ead185d5
commit 6966351113
13 changed files with 46 additions and 60 deletions

View file

@ -43,7 +43,6 @@ import java.util.List;
import java.util.Objects;
import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.dialogs.OptionsSheetDialogFragment;
import code.name.monkey.retromusic.fragments.AlbumCoverStyle;
import code.name.monkey.retromusic.fragments.NowPlayingScreen;
import code.name.monkey.retromusic.fragments.mainactivity.FoldersFragment;
@ -587,9 +586,6 @@ public final class PreferenceUtil {
return mPreferences.getInt(LAST_CHANGELOG_VERSION, -1);
}
public final int getLastMusicChooser() {
return mPreferences.getInt(LAST_MUSIC_CHOOSER, OptionsSheetDialogFragment.LIBRARY);
}
public void setLastMusicChooser(int value) {
mPreferences.edit().putInt(LAST_MUSIC_CHOOSER, value).apply();

View file

@ -16,7 +16,6 @@ package code.name.monkey.retromusic.util
import android.content.res.ColorStateList
import android.content.res.Resources
import android.graphics.PorterDuff
import android.graphics.drawable.LayerDrawable
import android.os.Build
import android.view.View
@ -42,7 +41,8 @@ object ViewUtil {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {
val layerDrawable = progressSlider.progressDrawable as LayerDrawable
val progressDrawable = layerDrawable.findDrawableByLayerId(android.R.id.progress)
progressDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
progressDrawable.colorFilter =
BlendModeColorFilterCompat.createBlendModeColorFilterCompat(newColor, SRC_IN)
} else {
progressSlider.progressTintList = ColorStateList.valueOf(newColor)
}