diff options
author | Romain Guy <romainguy@android.com> | 2009-07-19 19:47:42 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2009-07-19 19:49:47 -0700 |
commit | da3003e1d71d66a1c936489025f8db314a2a4588 (patch) | |
tree | 58dc5d92ace0aa0f2b176a62a5a222bedfcb0c6c /core | |
parent | aad0fcc9619eb72c18a6afff48ebc9d4011f0f54 (diff) | |
download | frameworks_base-da3003e1d71d66a1c936489025f8db314a2a4588.zip frameworks_base-da3003e1d71d66a1c936489025f8db314a2a4588.tar.gz frameworks_base-da3003e1d71d66a1c936489025f8db314a2a4588.tar.bz2 |
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.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/RelativeLayout.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index e62dda5..24c0e2a 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -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 |