diff options
| author | 2017-06-27 16:56:41 -0700 | |
|---|---|---|
| committer | 2017-06-28 00:13:15 +0000 | |
| commit | dba9934fb789d67bbd305aa384bf5917a001e715 (patch) | |
| tree | 355dc521f77a7897acba22b9b5ccf705c0b2f426 | |
| parent | bf15050a0c23fcfab2f7e103df6f86a65f72d212 (diff) | |
AdaptiveIconDrawable should not update layer bounds when bound is empty
Test: build succeeds. Also, setting tint mode does not result in error.
Bug: 37682281
Change-Id: I5991b8e58514a2130a793a5edb90baeafae9b148
| -rw-r--r-- | graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java b/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java index 8616d58a0319..1d0cfa5ff082 100644 --- a/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java +++ b/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java @@ -289,6 +289,9 @@ public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback } private void updateLayerBounds(Rect bounds) { + if (bounds.isEmpty()) { + return; + } try { suspendChildInvalidation(); updateLayerBoundsInternal(bounds); @@ -1109,4 +1112,4 @@ public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback mCheckedStateful = false; } } -}
\ No newline at end of file +} |