Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec7c9178 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing ConcurrentModificationException in tests

Change-Id: I7aabc62aa249dae979366ce2871604f5822f3139
parent f5853867
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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));
        }
    }