Merge "Fix threading problems with drawables" into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-05-18 00:24:03 +00:00
committed by Android (Google) Code Review

View File

@@ -109,9 +109,15 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
Drawable captionBackgroundDrawableDrawable, Drawable userCaptionBackgroundDrawable, Drawable captionBackgroundDrawableDrawable, Drawable userCaptionBackgroundDrawable,
int statusBarColor, int navigationBarColor) { int statusBarColor, int navigationBarColor) {
mDecorView = decorView; mDecorView = decorView;
mResizingBackgroundDrawable = resizingBackgroundDrawable; mResizingBackgroundDrawable = resizingBackgroundDrawable != null
mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable; ? resizingBackgroundDrawable.getConstantState().newDrawable()
mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable; : null;
mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable != null
? captionBackgroundDrawableDrawable.getConstantState().newDrawable()
: null;
mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable != null
? userCaptionBackgroundDrawable.getConstantState().newDrawable()
: null;
if (mCaptionBackgroundDrawable == null) { if (mCaptionBackgroundDrawable == null) {
mCaptionBackgroundDrawable = mResizingBackgroundDrawable; mCaptionBackgroundDrawable = mResizingBackgroundDrawable;
} }