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

Commit dbbf45e7 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Attempt to fix infinite recursion.

When collapsing a panel without animating, it might be that an
overscroll animating was still running, and thus expandedHeight != 0
even if we set expandedFraction manually to 0, which sets the state
to STATE_OPEN again and tries to close it in an infinite loop.

Bug: 15721600
Change-Id: I14e0ee43fb4a47286d618cc97581d4e4a98fb2a2
parent bcd83651
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -302,6 +302,8 @@ public class NotificationPanelView extends PanelView implements
        mUnlockIconActive = false;
        mPageSwiper.reset();
        closeQs();
        mNotificationStackScroller.setOverScrollAmount(0f, true /* onTop */, false /* animate */,
                true /* cancelAnimators */);
    }

    public void closeQs() {
+1 −1
Original line number Diff line number Diff line
@@ -188,10 +188,10 @@ public class PanelBar extends FrameLayout {
                pv.collapse();
                waiting = true;
            } else {
                pv.resetViews();
                pv.setExpandedFraction(0); // just in case
                pv.setVisibility(View.GONE);
                pv.cancelPeek();
                pv.resetViews();
            }
        }
        if (DEBUG) LOG("collapseAllPanels: animate=%s waiting=%s", animate, waiting);