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

Commit ccc8305a authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I58acbafc

* changes:
  Fix for http://b/issue?id=2323459 and generics correctness on a WeakReference
parents 1cc22955 58acbafc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -207,11 +207,13 @@ public final class ViewStub extends View {
            } else {
                throw new IllegalStateException("setVisibility called on un-referenced view");
            }
        } else if (visibility == VISIBLE || visibility == INVISIBLE) {
        } else {
            super.setVisibility(visibility);
            if (visibility == VISIBLE || visibility == INVISIBLE) {
                inflate();
            }
        }
    }

    /**
     * Inflates the layout resource identified by {@link #getLayoutResource()}
@@ -244,7 +246,7 @@ public final class ViewStub extends View {
                    parent.addView(view, index);
                }

                mInflatedViewRef = new WeakReference(view);
                mInflatedViewRef = new WeakReference<View>(view);

                if (mInflateListener != null) {
                    mInflateListener.onInflate(this, view);