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

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

Merge change 7857 into donut

* changes:
  Remove exception throw when a view has a self dependency inside a RelativeLayout.
parents 841f13c8 da3003e1
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -1295,11 +1295,8 @@ public class RelativeLayout extends ViewGroup {
                    if (rule > 0) {
                        // The node this node depends on
                        final Node dependency = keyNodes.get(rule);
                        if (dependency == node) {
                            throw new IllegalStateException("A view cannot have a dependency" +
                                    " on itself");
                        }
                        if (dependency == null) {
                        // Skip unknowns and self dependencies
                        if (dependency == null || dependency == node) {
                            continue;
                        }
                        // Add the current node as a dependent