Replace for loops with foreach

This commit is contained in:
Eugene Cheung 2018-09-05 22:44:45 -04:00
commit 42bcb62d2c
No known key found for this signature in database
GPG key ID: E1FD745328866B0A
2 changed files with 5 additions and 5 deletions

View file

@ -165,9 +165,9 @@ public class MusicLibraryPagerAdapter extends FragmentPagerAdapter {
public static MusicFragments of(Class<?> cl) {
MusicFragments[] fragments = All.FRAGMENTS;
for (int i = 0; i < fragments.length; i++) {
if (cl.equals(fragments[i].mFragmentClass))
return fragments[i];
for (MusicFragments fragment : fragments) {
if (cl.equals(fragment.mFragmentClass))
return fragment;
}
throw new IllegalArgumentException("Unknown music fragment " + cl);