Actually renamy downloads to network

This commit is contained in:
ByteHamster 2018-04-22 19:00:07 +02:00
parent 610b1c05e1
commit 1690bd64cc
4 changed files with 10 additions and 10 deletions

View File

@ -139,8 +139,8 @@ public class PreferenceActivity extends AppCompatActivity {
private int getTitle(int preferences) { private int getTitle(int preferences) {
switch (preferences) { switch (preferences) {
case R.xml.preferences_downloads: case R.xml.preferences_network:
return R.string.downloads_label; return R.string.network_pref;
case R.xml.preferences_autodownload: case R.xml.preferences_autodownload:
return R.string.pref_automatic_download_title; return R.string.pref_automatic_download_title;
case R.xml.preferences_playback: case R.xml.preferences_playback:

View File

@ -95,7 +95,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
private static final String PREF_SCREEN_USER_INTERFACE = "prefScreenInterface"; private static final String PREF_SCREEN_USER_INTERFACE = "prefScreenInterface";
private static final String PREF_SCREEN_PLAYBACK = "prefScreenPlayback"; private static final String PREF_SCREEN_PLAYBACK = "prefScreenPlayback";
private static final String PREF_SCREEN_DOWNLOADS = "prefScreenDownloads"; private static final String PREF_SCREEN_NETWORK = "prefScreenNetwork";
private static final String PREF_SCREEN_SERVICES = "prefScreenServices"; private static final String PREF_SCREEN_SERVICES = "prefScreenServices";
private static final String PREF_SCREEN_STORAGE = "prefScreenStorage"; private static final String PREF_SCREEN_STORAGE = "prefScreenStorage";
private static final String PREF_SCREEN_AUTODL = "prefAutoDownloadSettings"; private static final String PREF_SCREEN_AUTODL = "prefAutoDownloadSettings";
@ -164,8 +164,8 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
case R.xml.preferences: case R.xml.preferences:
setupMainScreen(); setupMainScreen();
break; break;
case R.xml.preferences_downloads: case R.xml.preferences_network:
setupDownloadsScreen(); setupNetworkScreen();
break; break;
case R.xml.preferences_autodownload: case R.xml.preferences_autodownload:
setupAutoDownloadScreen(); setupAutoDownloadScreen();
@ -431,7 +431,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
); );
} }
private void setupDownloadsScreen() { private void setupNetworkScreen() {
final Activity activity = ui.getActivity(); final Activity activity = ui.getActivity();
ui.findPreference(PREF_SCREEN_AUTODL).setOnPreferenceClickListener(preference -> ui.findPreference(PREF_SCREEN_AUTODL).setOnPreferenceClickListener(preference ->
openScreen(R.xml.preferences_autodownload, activity)); openScreen(R.xml.preferences_autodownload, activity));
@ -498,8 +498,8 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
openScreen(R.xml.preferences_user_interface, activity)); openScreen(R.xml.preferences_user_interface, activity));
ui.findPreference(PREF_SCREEN_PLAYBACK).setOnPreferenceClickListener(preference -> ui.findPreference(PREF_SCREEN_PLAYBACK).setOnPreferenceClickListener(preference ->
openScreen(R.xml.preferences_playback, activity)); openScreen(R.xml.preferences_playback, activity));
ui.findPreference(PREF_SCREEN_DOWNLOADS).setOnPreferenceClickListener(preference -> ui.findPreference(PREF_SCREEN_NETWORK).setOnPreferenceClickListener(preference ->
openScreen(R.xml.preferences_downloads, activity)); openScreen(R.xml.preferences_network, activity));
ui.findPreference(PREF_SCREEN_SERVICES).setOnPreferenceClickListener(preference -> ui.findPreference(PREF_SCREEN_SERVICES).setOnPreferenceClickListener(preference ->
openScreen(R.xml.preferences_services, activity)); openScreen(R.xml.preferences_services, activity));
ui.findPreference(PREF_SCREEN_STORAGE).setOnPreferenceClickListener(preference -> ui.findPreference(PREF_SCREEN_STORAGE).setOnPreferenceClickListener(preference ->
@ -616,7 +616,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
public void onResume(int screen) { public void onResume(int screen) {
switch (screen) { switch (screen) {
case R.xml.preferences_downloads: case R.xml.preferences_network:
setUpdateIntervalText(); setUpdateIntervalText();
setParallelDownloadsText(UserPreferences.getParallelDownloads()); setParallelDownloadsText(UserPreferences.getParallelDownloads());
break; break;

View File

@ -12,7 +12,7 @@
android:icon="?attr/av_play" /> android:icon="?attr/av_play" />
<Preference <Preference
android:key="prefScreenDownloads" android:key="prefScreenNetwork"
android:title="@string/network_pref" android:title="@string/network_pref"
android:icon="?attr/av_download" /> android:icon="?attr/av_download" />