More minSdk 21 cleanup

This commit is contained in:
TacoTheDank 2022-07-06 17:48:38 -04:00 committed by Stypox
parent 4ec9cbe379
commit 189c92affa
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
4 changed files with 5 additions and 26 deletions

View file

@ -1,19 +1,9 @@
package org.schabi.newpipe.settings
import android.os.Build
import android.os.Bundle
import androidx.preference.Preference
import org.schabi.newpipe.R
class PlayerNotificationSettingsFragment : BasePreferenceFragment() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResourceRegistry()
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
val colorizePref: Preference? = findPreference(getString(R.string.notification_colorize_key))
colorizePref?.let {
preferenceScreen.removePreference(it)
}
}
}
}

View file

@ -218,7 +218,7 @@ public class NotificationActionsPreference extends Preference {
final int color = ThemeHelper.resolveColorFromAttr(getContext(),
android.R.attr.textColorPrimary);
drawable = DrawableCompat.wrap(drawable).mutate();
DrawableCompat.setTint(drawable, color);
drawable.setTint(color);
radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds(null,
null, drawable, null);
}