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

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

Fixing crash in folder

Getting the parent, before the folder is removed from DragLayer

Bug: 32141195
Change-Id: I0bd3163a1425c994280cd61197845afab3c2c185
parent 76303699
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -702,6 +702,7 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC
        }

        if (!(getParent() instanceof DragLayer)) return;
        DragLayer parent = (DragLayer) getParent();

        if (animate) {
            animateClosed();
@@ -711,8 +712,7 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC

        // Notify the accessibility manager that this folder "window" has disappeared and no
        // longer occludes the workspace items
        ((DragLayer) getParent())
                .sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
        parent.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
    }

    private void animateClosed() {