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

Commit a4d4a4c6 authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "Do not draw background if the background drawable is null"

parents 7bf914d2 0fd2574a
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -289,12 +289,17 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
        DisplayListCanvas canvas = mFrameAndBackdropNode.start(width, height);
        final Drawable drawable = mUserCaptionBackgroundDrawable != null
                ? mUserCaptionBackgroundDrawable : mCaptionBackgroundDrawable;

        if (drawable != null) {
            drawable.setBounds(0, 0, left + width, top + mLastCaptionHeight);
            drawable.draw(canvas);
        }

        // The backdrop: clear everything with the background. Clipping is done elsewhere.
        if (mResizingBackgroundDrawable != null) {
            mResizingBackgroundDrawable.setBounds(0, mLastCaptionHeight, left + width, top + height);
            mResizingBackgroundDrawable.draw(canvas);
        }
        mFrameAndBackdropNode.end(canvas);

        if (mSystemBarBackgroundNode != null && mStatusBarColor != null) {