Added line to mark the mGradientIsDirty flag to true in order to
recompute GradientDrawable drawing bounds

Updated logic in GradientDrawable#setStrokeInternal to set the
mGradientIsDirty flag to true when the stroke is changed in order to
have ensureValidRect be called and recompute the drawing bounds
configured on mRect. In the event that a stroke width is defined, the
drawing rect must be inset by half the stroke width. Otherwise the
stroke will be drawn at the edges of the boundary and be clipped.

Bug: 70915849
Test: Ran test app provided in bug and confirmed that modifying the
strokeWidth on a pre-existing GradientDrawable matches the behavior of a
brand new GradientDrawable instance used as the background on a view

Change-Id: Icaa53d936589a9b4790f89e894f1d745c6e4fe43
1 file changed