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

Commit a17fa708 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Dispatch aggregated visibility when performing attachViewToParent" into nyc-dev

parents 836ed4a5 c5874094
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4994,6 +4994,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        if (child.hasFocus()) {
            requestChildFocus(child, child.findFocus());
        }
        dispatchVisibilityAggregated(isAttachedToWindow() && getWindowVisibility() == VISIBLE
                && isShown());
    }

    /**
+6 −3
Original line number Diff line number Diff line
@@ -913,8 +913,10 @@ public class ImageView extends View {
        if (mDrawable != null) {
            mDrawable.setCallback(null);
            unscheduleDrawable(mDrawable);
            if (isAttachedToWindow()) {
                mDrawable.setVisible(false, false);
            }
        }

        mDrawable = d;

@@ -924,8 +926,9 @@ public class ImageView extends View {
            if (d.isStateful()) {
                d.setState(getDrawableState());
            }
            d.setVisible(isAttachedToWindow() && getWindowVisibility() == VISIBLE && isShown(),
                    true);
            if (isAttachedToWindow()) {
                d.setVisible(getWindowVisibility() == VISIBLE && isShown(), true);
            }
            d.setLevel(mLevel);
            mDrawableWidth = d.getIntrinsicWidth();
            mDrawableHeight = d.getIntrinsicHeight();