Merge "Protect against null drawable" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-08 17:27:52 +00:00
committed by Android (Google) Code Review

View File

@@ -1214,7 +1214,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
&& mLastOriginalBackgroundDrawable == mOriginalBackgroundDrawable) { && mLastOriginalBackgroundDrawable == mOriginalBackgroundDrawable) {
return; return;
} }
if (mBackgroundInsets.equals(Insets.NONE)) { if (mOriginalBackgroundDrawable == null || mBackgroundInsets.equals(Insets.NONE)) {
setBackground(mOriginalBackgroundDrawable); setBackground(mOriginalBackgroundDrawable);
} else { } else {
setBackground(new InsetDrawable(mOriginalBackgroundDrawable, setBackground(new InsetDrawable(mOriginalBackgroundDrawable,