Replace for loop with foreach
This commit is contained in:
parent
cbc3b23753
commit
a8e4fcf1b0
|
@ -96,10 +96,10 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
|
|||
solo.clickOnText(solo.getString(R.string.pref_compact_notification_buttons_title));
|
||||
solo.waitForDialogToOpen(1000);
|
||||
// First uncheck every checkbox
|
||||
for (int i=0; i<buttons.length; i++) {
|
||||
assertTrue(solo.searchText(buttons[i]));
|
||||
if (solo.isTextChecked(buttons[i])) {
|
||||
solo.clickOnText(buttons[i]);
|
||||
for (String button : buttons) {
|
||||
assertTrue(solo.searchText(button));
|
||||
if (solo.isTextChecked(button)) {
|
||||
solo.clickOnText(button);
|
||||
}
|
||||
}
|
||||
// Now try to check all checkboxes
|
||||
|
|
|
@ -183,8 +183,8 @@ public class UserPreferences {
|
|||
String.valueOf(NOTIFICATION_BUTTON_SKIP)),
|
||||
",");
|
||||
List<Integer> notificationButtons = new ArrayList<>();
|
||||
for (int i=0; i<buttons.length; i++) {
|
||||
notificationButtons.add(Integer.parseInt(buttons[i]));
|
||||
for (String button : buttons) {
|
||||
notificationButtons.add(Integer.parseInt(button));
|
||||
}
|
||||
return notificationButtons;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue