Replaced for loop array copy with System.arraycopy calls

This commit is contained in:
Jonas Kalderstam 2019-09-12 23:49:32 +02:00
parent e7df195d3a
commit 00c1e7a3d3
1 changed files with 2 additions and 4 deletions

View File

@ -60,10 +60,8 @@ public class FeedSettingsFragment extends PreferenceFragmentCompat {
String[] entries = new String[speeds.length + 1]; String[] entries = new String[speeds.length + 1];
entries[0] = getString(R.string.feed_auto_download_global); entries[0] = getString(R.string.feed_auto_download_global);
for (int i = 0; i < speeds.length; i++) { System.arraycopy(speeds, 0, values, 1, speeds.length);
values[i + 1] = speeds[i]; System.arraycopy(speeds, 0, entries, 1, speeds.length);
entries[i + 1] = speeds[i];
}
feedPlaybackSpeedPreference.setEntryValues(values); feedPlaybackSpeedPreference.setEntryValues(values);
feedPlaybackSpeedPreference.setEntries(entries); feedPlaybackSpeedPreference.setEntries(entries);