From 417dcdacf02df820d304e6d8e6c0997880ba5725 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 2 Jan 2020 18:16:40 +0100 Subject: [PATCH 1/4] Removed API checks --- .../UserInterfacePreferencesFragment.java | 13 ------------- .../core/service/PlayerWidgetJobService.java | 8 ++------ core/src/main/res/values-v16/styles.xml | 9 --------- core/src/main/res/values/styles.xml | 1 + 4 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 core/src/main/res/values-v16/styles.xml diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java index 191999cf7..0acfe60bf 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java @@ -33,19 +33,6 @@ public class UserInterfacePreferencesFragment extends PreferenceFragmentCompat { } private void setupInterfaceScreen() { - - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { - // disable expanded notification option on unsupported android versions - findPreference(PREF_EXPANDED_NOTIFICATION).setEnabled(false); - findPreference(PREF_EXPANDED_NOTIFICATION).setOnPreferenceClickListener( - preference -> { - Toast toast = Toast.makeText(getActivity(), - R.string.pref_expand_notify_unsupport_toast, Toast.LENGTH_SHORT); - toast.show(); - return true; - } - ); - } findPreference(UserPreferences.PREF_THEME) .setOnPreferenceChangeListener( (preference, newValue) -> { diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java index 2d9de1894..e6f2176f7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java @@ -159,14 +159,10 @@ public class PlayerWidgetJobService extends SafeJobIntentService { if (status == PlayerStatus.PLAYING) { views.setImageViewResource(R.id.butPlay, R.drawable.ic_pause_white_24dp); - if (Build.VERSION.SDK_INT >= 15) { - views.setContentDescription(R.id.butPlay, getString(R.string.pause_label)); - } + views.setContentDescription(R.id.butPlay, getString(R.string.pause_label)); } else { views.setImageViewResource(R.id.butPlay, R.drawable.ic_play_arrow_white_24dp); - if (Build.VERSION.SDK_INT >= 15) { - views.setContentDescription(R.id.butPlay, getString(R.string.play_label)); - } + views.setContentDescription(R.id.butPlay, getString(R.string.play_label)); } views.setOnClickPendingIntent(R.id.butPlay, createMediaButtonIntent()); } else { diff --git a/core/src/main/res/values-v16/styles.xml b/core/src/main/res/values-v16/styles.xml deleted file mode 100644 index 947e43f38..000000000 --- a/core/src/main/res/values-v16/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index a638917f4..2ccd48353 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -279,6 +279,7 @@