Correctly clear resizing drawable when nulling background.

When a null window background is set, we want to use the
fallback drawable for resizing.

Bug: 28801472

Change-Id: Ia616d7aa18b0d7aa2c7081a85ce7551ecfeca5b3
This commit is contained in:
Robert Carr
2016-05-19 14:11:15 -07:00
parent 2486cb2c89
commit 692a5feab9

View File

@@ -908,7 +908,12 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
setBackgroundDrawable(drawable);
if (drawable != null) {
mResizingBackgroundDrawable = drawable;
drawable.getPadding(mBackgroundPadding);
} else {
mResizingBackgroundDrawable = getResizingBackgroundDrawable(
getContext(), 0, mWindow.mBackgroundFallbackResource);
}
if (mResizingBackgroundDrawable != null) {
mResizingBackgroundDrawable.getPadding(mBackgroundPadding);
} else {
mBackgroundPadding.setEmpty();
}