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

Commit 8c5f7616 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am ad26d4d6: am 38330ec3: Merge "Avoid running layout transitions on...

am ad26d4d6: am 38330ec3: Merge "Avoid running layout transitions on unattached views and windows" into jb-dev

* commit 'ad26d4d6':
  Avoid running layout transitions on unattached views and windows
parents 85f99ac1 ad26d4d6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1208,6 +1208,9 @@ public class LayoutTransition {
     * affect CHANGE_APPEARING or CHANGE_DISAPPEARING animations.
     */
    private void addChild(ViewGroup parent, View child, boolean changesLayout) {
        if (parent.getWindowVisibility() != View.VISIBLE) {
            return;
        }
        if ((mTransitionTypes & FLAG_APPEARING) == FLAG_APPEARING) {
            // Want disappearing animations to finish up before proceeding
            cancel(DISAPPEARING);
@@ -1243,6 +1246,9 @@ public class LayoutTransition {
     * @hide
     */
    public void layoutChange(ViewGroup parent) {
        if (parent.getWindowVisibility() != View.VISIBLE) {
            return;
        }
        if ((mTransitionTypes & FLAG_CHANGING) == FLAG_CHANGING  && !isRunning()) {
            // This method is called for all calls to layout() in the container, including
            // those caused by add/remove/hide/show events, which will already have set up
@@ -1301,6 +1307,9 @@ public class LayoutTransition {
     * affect CHANGE_APPEARING or CHANGE_DISAPPEARING animations.
     */
    private void removeChild(ViewGroup parent, View child, boolean changesLayout) {
        if (parent.getWindowVisibility() != View.VISIBLE) {
            return;
        }
        if ((mTransitionTypes & FLAG_DISAPPEARING) == FLAG_DISAPPEARING) {
            // Want appearing animations to finish up before proceeding
            cancel(APPEARING);