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

Commit 0d9f35d1 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix crash when reset() gets called during an animation

Bug: 17058023
Change-Id: I2ed77b49c4daf1790e43f74a274054618e378b40
parent 03861d07
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -66,6 +66,12 @@ public class NotificationContentView extends FrameLayout {
    }

    public void reset() {
        if (mContractedChild != null) {
            mContractedChild.animate().cancel();
        }
        if (mExpandedChild != null) {
            mExpandedChild.animate().cancel();
        }
        removeAllViews();
        mContractedChild = null;
        mExpandedChild = null;
@@ -76,6 +82,7 @@ public class NotificationContentView extends FrameLayout {

    public void setContractedChild(View child) {
        if (mContractedChild != null) {
            mContractedChild.animate().cancel();
            removeView(mContractedChild);
        }
        sanitizeContractedLayoutParams(child);
@@ -86,6 +93,7 @@ public class NotificationContentView extends FrameLayout {

    public void setExpandedChild(View child) {
        if (mExpandedChild != null) {
            mExpandedChild.animate().cancel();
            removeView(mExpandedChild);
        }
        addView(child);