Merge "Fix a NPE with outlineProvider="none""
am: 46a4fbb2e4
Change-Id: Ib14f6b5369d60c06a716b99dd0274872fc0d2a51
This commit is contained in:
@@ -50,12 +50,14 @@ public class ViewGroup_Delegate {
|
||||
// the outline obtained is correct.
|
||||
child.setBackgroundBounds();
|
||||
ViewOutlineProvider outlineProvider = child.getOutlineProvider();
|
||||
Outline outline = child.mAttachInfo.mTmpOutline;
|
||||
outlineProvider.getOutline(child, outline);
|
||||
if (outline.mPath != null || (outline.mRect != null && !outline.mRect.isEmpty())) {
|
||||
int restoreTo = transformCanvas(thisVG, canvas, child);
|
||||
drawShadow(thisVG, canvas, child, outline);
|
||||
canvas.restoreToCount(restoreTo);
|
||||
if (outlineProvider != null) {
|
||||
Outline outline = child.mAttachInfo.mTmpOutline;
|
||||
outlineProvider.getOutline(child, outline);
|
||||
if (outline.mPath != null || (outline.mRect != null && !outline.mRect.isEmpty())) {
|
||||
int restoreTo = transformCanvas(thisVG, canvas, child);
|
||||
drawShadow(thisVG, canvas, child, outline);
|
||||
canvas.restoreToCount(restoreTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
return thisVG.drawChild_Original(canvas, child, drawingTime);
|
||||
|
||||
Reference in New Issue
Block a user