summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shailesh Saini <shaileshs@google.com> 2018-02-01 21:20:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-02-01 21:20:24 +0000
commit7de6312dde9dd61d720a366d981cd96cc8b6fdd4 (patch)
treed5bfa477265252e61c13574535736aa2bcfdc108
parent35a855de49f3f7cf7c4ecb923cf334c18910483e (diff)
parent8980958454ced6db001452e1f5f5811a944716d4 (diff)
Merge "AdaptiveIconDrawable should not update layer bounds when bound is empty" into oc-dev
-rw-r--r--graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java5
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
+}