diff options
author | Michael Jurka <mikejurka@google.com> | 2013-03-21 16:07:45 +0100 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2013-03-21 16:12:35 +0100 |
commit | 0931a8516af8284981bb9d584e57cbc3925db4bc (patch) | |
tree | ab2d68791c6fe768a906a78f6ba9c33b3468c2fe /core/java | |
parent | 62a4858b7915d6d190bb0cdb806a733b02049f5a (diff) | |
download | frameworks_base-0931a8516af8284981bb9d584e57cbc3925db4bc.zip frameworks_base-0931a8516af8284981bb9d584e57cbc3925db4bc.tar.gz frameworks_base-0931a8516af8284981bb9d584e57cbc3925db4bc.tar.bz2 |
Make hasOverlappingRendering() method more accurate
Bug: 8439502
Change-Id: I80075eddf6abc7999b70e665e692d88b81d5f087
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/widget/ImageView.java | 2 | ||||
-rw-r--r-- | core/java/android/widget/TextView.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index 1bbf4eb..cde6ceb 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -204,7 +204,7 @@ public class ImageView extends View { @Override public boolean hasOverlappingRendering() { - return (getBackground() != null); + return (getBackground() != null && getBackground().getCurrent() != null); } @Override diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 5fbb642..52b7a81 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -4794,7 +4794,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener @Override public boolean hasOverlappingRendering() { - return (getBackground() != null || mText instanceof Spannable || hasSelection()); + return ((getBackground() != null && getBackground().getCurrent() != null) + || mText instanceof Spannable || hasSelection()); } /** |