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
This commit is contained in:
parent
e80a0caa81
commit
e41034034f
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue