Merge "Make hasOverlappingRendering() method more accurate" into jb-mr2-dev

This commit is contained in:
Michael Jurka
2013-03-21 17:04:54 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 2 deletions

View File

@@ -204,7 +204,7 @@ public class ImageView extends View {
@Override
public boolean hasOverlappingRendering() {
return (getBackground() != null);
return (getBackground() != null && getBackground().getCurrent() != null);
}
@Override

View File

@@ -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());
}
/**