Fix crash if drawable doesn't have constant state
Change-Id: I2364efb9dc1446bc1a8c50abf6bd34a73c226f7e Fixes: 31755893
This commit is contained in:
@@ -110,12 +110,15 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
|
|||||||
int statusBarColor, int navigationBarColor) {
|
int statusBarColor, int navigationBarColor) {
|
||||||
mDecorView = decorView;
|
mDecorView = decorView;
|
||||||
mResizingBackgroundDrawable = resizingBackgroundDrawable != null
|
mResizingBackgroundDrawable = resizingBackgroundDrawable != null
|
||||||
|
&& resizingBackgroundDrawable.getConstantState() != null
|
||||||
? resizingBackgroundDrawable.getConstantState().newDrawable()
|
? resizingBackgroundDrawable.getConstantState().newDrawable()
|
||||||
: null;
|
: null;
|
||||||
mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable != null
|
mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable != null
|
||||||
|
&& captionBackgroundDrawableDrawable.getConstantState() != null
|
||||||
? captionBackgroundDrawableDrawable.getConstantState().newDrawable()
|
? captionBackgroundDrawableDrawable.getConstantState().newDrawable()
|
||||||
: null;
|
: null;
|
||||||
mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable != null
|
mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable != null
|
||||||
|
&& userCaptionBackgroundDrawable.getConstantState() != null
|
||||||
? userCaptionBackgroundDrawable.getConstantState().newDrawable()
|
? userCaptionBackgroundDrawable.getConstantState().newDrawable()
|
||||||
: null;
|
: null;
|
||||||
if (mCaptionBackgroundDrawable == null) {
|
if (mCaptionBackgroundDrawable == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user