From 683d9816cb21124cc1f0f04ee26130cb5c4e5a4c Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 24 Dec 2021 21:27:45 +0100 Subject: [PATCH] Removed dead code --- .../newpipe/settings/AppearanceSettingsFragment.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java index 1e1b03b4f..4bc5a210e 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java @@ -2,7 +2,6 @@ package org.schabi.newpipe.settings; import android.content.ActivityNotFoundException; import android.content.Intent; -import android.os.Build; import android.os.Bundle; import android.provider.Settings; import android.widget.Toast; @@ -15,10 +14,6 @@ import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.ThemeHelper; public class AppearanceSettingsFragment extends BasePreferenceFragment { - private static final boolean CAPTIONING_SETTINGS_ACCESSIBLE = - Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; - - private String captionSettingsKey; @Override public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) { @@ -51,16 +46,11 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment { } else { removePreference(nightThemeKey); } - - captionSettingsKey = getString(R.string.caption_settings_key); - if (!CAPTIONING_SETTINGS_ACCESSIBLE) { - removePreference(captionSettingsKey); - } } @Override public boolean onPreferenceTreeClick(final Preference preference) { - if (preference.getKey().equals(captionSettingsKey) && CAPTIONING_SETTINGS_ACCESSIBLE) { + if (preference.getKey().equals(getString(R.string.caption_settings_key))) { try { startActivity(new Intent(Settings.ACTION_CAPTIONING_SETTINGS)); } catch (final ActivityNotFoundException e) {