Removed dead code

This commit is contained in:
litetex 2021-12-24 21:27:45 +01:00
parent 8802582997
commit 683d9816cb
1 changed files with 1 additions and 11 deletions

View File

@ -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) {