fix lint warnings in PreferencesFragment

This commit is contained in:
Hans-Christoph Steiner 2018-04-23 21:32:24 +02:00
parent 50bce42940
commit f15c85146d

View File

@ -55,7 +55,6 @@ public class PreferencesFragment extends PreferenceFragment
private Preference updateAutoDownloadPref; private Preference updateAutoDownloadPref;
private Preference updatePrivilegedExtensionPref; private Preference updatePrivilegedExtensionPref;
private long currentKeepCacheTime; private long currentKeepCacheTime;
private FDroidApp fdroidApp;
@Override @Override
public void onCreatePreferences(Bundle bundle, String s) { public void onCreatePreferences(Bundle bundle, String s) {
@ -78,7 +77,7 @@ public class PreferencesFragment extends PreferenceFragment
} }
private void checkSummary(String key, int resId) { private void checkSummary(String key, int resId) {
CheckBoxPreference pref = (CheckBoxPreference) findPreference(key); Preference pref = findPreference(key);
pref.setSummary(resId); pref.setSummary(resId);
} }
@ -123,10 +122,10 @@ public class PreferencesFragment extends PreferenceFragment
entrySummary(key); entrySummary(key);
if (changing) { if (changing) {
Activity activity = getActivity(); Activity activity = getActivity();
fdroidApp = (FDroidApp) activity.getApplication(); FDroidApp fdroidApp = (FDroidApp) activity.getApplication();
fdroidApp.reloadTheme(); fdroidApp.reloadTheme();
fdroidApp.applyTheme(activity); fdroidApp.applyTheme(activity);
fdroidApp.forceChangeTheme(activity); FDroidApp.forceChangeTheme(activity);
} }
break; break;