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

Commit 1f265cc9 authored by fbaron's avatar fbaron
Browse files

Fix indexoutofbounds in Folder

Flag: NONE
Test: n/a
Fix: 322875847
Change-Id: I14f6ebe135014c806aee310e5919a72a6e8820f7
parent ac7c1e37
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -800,6 +800,14 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
            return;
        }

        int size = getIconsInReadingOrder().size();
        if (size <= 1) {
            Log.d(TAG, "Couldn't animate folder closed because there's " + size + " icons");
            closeComplete(false);
            post(this::announceAccessibilityChanges);
            return;
        }

        mContent.completePendingPageChanges();
        mContent.snapToPageImmediately(mContent.getDestinationPage());