Fixing ConcurrentModificationException in tests

Change-Id: I7aabc62aa249dae979366ce2871604f5822f3139
This commit is contained in:
Sunny Goyal
2015-10-20 10:31:09 -07:00
parent f58538672a
commit ec7c9178dd
@@ -52,9 +52,12 @@ public class InvariantDeviceProfileTest extends AndroidTestCase {
public void testFindClosestDeviceProfile2() {
for (InvariantDeviceProfile idf: mPredefinedDeviceProfiles) {
ArrayList<InvariantDeviceProfile> predefinedProfilesCopy =
new ArrayList<>(mPredefinedDeviceProfiles);
ArrayList<InvariantDeviceProfile> closestProfiles =
mInvariantProfile.findClosestDeviceProfiles(
idf.minWidthDps, idf.minHeightDps, mPredefinedDeviceProfiles);
idf.minWidthDps, idf.minHeightDps, predefinedProfilesCopy
);
assertTrue(closestProfiles.get(0).equals(idf));
}
}