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

Commit e4103403 authored by Cyrus Boadway's avatar Cyrus Boadway
Browse files

Fix FloatingWidgetView post-animation fallback background handling

The background drawables should only be restored to the original view if
the values are non-null. The original view may have had a background drawable
be a drawable, just not one that's elligible for animation. In that
case the local reference is null. We should not restore that.

Bug: 169042867
Test: manual
Change-Id: I54eaac5632e3f4f25daee2c36d7609e8b2ffedaf
parent e80a0caa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -100,8 +100,8 @@ final class FloatingWidgetBackgroundView extends View {
    /** Restores the drawables to the source view. */
    void finish() {
        if (isUninitialized()) return;
        mSourceView.setForeground(mOriginalForeground);
        mSourceView.setBackground(mOriginalBackground);
        if (mOriginalForeground != null) mSourceView.setForeground(mOriginalForeground);
        if (mOriginalBackground != null) mSourceView.setBackground(mOriginalBackground);
    }

    void recycle() {