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

Commit da3003e1 authored by Romain Guy's avatar Romain Guy
Browse files

Remove exception throw when a view has a self dependency inside a

RelativeLayout.

There are unfortunately successful 3rd party apps declaring self dependencies.
There's no reason to crash the app so just ignore this issue.
parent aad0fcc9
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