Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e09e982 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 718ba309 ca0cf0f5
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -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;
        }