diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-09-29 21:05:46 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-09-29 21:05:46 +0000 |
| commit | d96b97b855f4fbd22690b4f261d6c39f0f4d49f3 (patch) | |
| tree | 345b490f5d4afbe4bc38a1644f06909be5f3fba8 /core/java/android/widget/SmartSelectSprite.java | |
| parent | e93e6c5ef185be90431c11345a609364be654f20 (diff) | |
| parent | c1950a00526d0af9a9279ded0b4e8812d9daa2f9 (diff) | |
Merge "Do not draw rectangles with the same left and right boundaries"
Diffstat (limited to 'core/java/android/widget/SmartSelectSprite.java')
| -rw-r--r-- | core/java/android/widget/SmartSelectSprite.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/widget/SmartSelectSprite.java b/core/java/android/widget/SmartSelectSprite.java index 27eff4394f96..7cbc494b37af 100644 --- a/core/java/android/widget/SmartSelectSprite.java +++ b/core/java/android/widget/SmartSelectSprite.java @@ -146,9 +146,9 @@ final class SmartSelectSprite { private final RectF mClipRect = new RectF(); private final Path mClipPath = new Path(); - /** How far offset the left edge of the rectangle is from the bounding box. */ + /** How offset the left edge of the rectangle is from the left side of the bounding box. */ private float mLeftBoundary = 0; - /** How far offset the right edge of the rectangle is from the bounding box. */ + /** How offset the right edge of the rectangle is from the left side of the bounding box. */ private float mRightBoundary = 0; /** Whether the horizontal bounds are inverted (for RTL scenarios). */ @@ -193,6 +193,10 @@ final class SmartSelectSprite { */ @Override public void draw(Canvas canvas, Paint paint) { + if (mLeftBoundary == mRightBoundary) { + return; + } + final float cornerRadius = getCornerRadius(); final float adjustedCornerRadius = getAdjustedCornerRadius(); |
