am 8b9baf2d: Merge change 7857 into donut

Merge commit '8b9baf2dfb4dd1bd6379d923a3aa61a082783368'

* commit '8b9baf2dfb4dd1bd6379d923a3aa61a082783368':
  Remove exception throw when a view has a self dependency inside a
This commit is contained in:
Android (Google) Code Review
2009-07-19 21:15:01 -07:00
committed by Android Git Automerger

View File

@@ -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