Replaced for loop array copy with System.arraycopy calls
This commit is contained in:
parent
e7df195d3a
commit
00c1e7a3d3
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue