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