commit | 4d36ec11f21ccbb71fbf9277e14b440ad62ba31d | [log] [tgz] |
---|---|---|
author | Adam Powell <adamp@google.com> | Sun Jul 17 16:44:16 2011 -0700 |
committer | Adam Powell <adamp@google.com> | Sun Jul 17 16:44:16 2011 -0700 |
tree | fb4c4e51f665ad6c35fd445e6c2ab3538669f37f | |
parent | 9c7b5ec07358b30dca512bd256ec94f2f59df1de [diff] [blame] |
Make View#setBackgroundDrawable a no-op if setting the same background. Change-Id: Idd3e0ae80609557d82a5564daa1cfb0abca42ded
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 2a65f0c..41b9e2d 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java
@@ -11122,6 +11122,10 @@ * background */ public void setBackgroundDrawable(Drawable d) { + if (d == mBGDrawable) { + return; + } + boolean requestLayout = false; mBackgroundResource = 0;