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

Commit ab4bb06b authored by Kristian Monsen's avatar Kristian Monsen Committed by Android (Google) Code Review
Browse files

Merge "Update ViewLocationHolder#compareTo to properly implement Comparable"

parents 03f5ff48 2c35d03c
Loading
Loading
Loading
Loading
+3 −12
Original line number Diff line number Diff line
@@ -6939,13 +6939,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            if (getClass() != another.getClass()) {
                return 1;
            }
            // First is above second.
            if (mLocation.bottom - another.mLocation.top <= 0) {
                return -1;
            }
            // First is below second.
            if (mLocation.top - another.mLocation.bottom >= 0) {
                return 1;
            final int topDiference = mLocation.top - another.mLocation.top;
            if (topDiference != 0) {
                return topDiference;
            }
            // LTR
            if (mLayoutDirection == LAYOUT_DIRECTION_LTR) {
@@ -6961,11 +6957,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                    return -rightDifference;
                }
            }
            // Break tie by top.
            final int topDiference = mLocation.top - another.mLocation.top;
            if (topDiference != 0) {
                return topDiference;
            }
            // Break tie by height.
            final int heightDiference = mLocation.height() - another.mLocation.height();
            if (heightDiference != 0) {