Make Canvas#drawPatch public
Bug: 155422223 Bug: 155661807 Test: NinePatchTest#testDraw Test: NinePatchDrawableTest#testDraw As part of the move to a mainline module, code outside the module cannot access @hidden APIs on Canvas. Although no code outside the module calls these methods, there is a Canvas subclass that overrides it - NopCanvas, which overrides it to do nothing. This is useful, and cannot be achieved another way. (If NopCanvas did not override drawPatch, it would crash when attempting to draw a NinePatchDrawable.) In addition, this method is already public on RecordingCanvas. (This is likely an accident; it contains no documentation for the method.) Lastly, it is somewhat arbitrary that the way to draw a NinePatch directly was to call NinePatch#draw. This is the reverse of how Canvas drawing generally works. The newly public method matches the typical pattern (Canvas#draw<Something>(Something, Paint)) and is already called by NinePatch#draw. Change-Id: I16d7dc7391e3ad5777fdd7023472545c6104af69
Loading
Please register or sign in to comment