Merge "Fix threading problems with drawables" into nyc-dev am: 1e09e9826b am: e48384c867

am: 22507e99ff

* commit '22507e99ff289b20caa647fad0ca3b637ee0f14e':
  Fix threading problems with drawables

Change-Id: I06fa9ebcdd1c0b0006ecc8f4481fcf45a3f5f8fa
This commit is contained in:
Jorim Jaggi
2016-05-18 00:39:39 +00:00
committed by android-build-merger

View File

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