AdaptiveIconDrawable should not update layer bounds when bound is empty
Test: build succeeds. Also, setting tint mode does not result in error.
Bug: 37682281
Bug: 69969749
Change-Id: I5991b8e58514a2130a793a5edb90baeafae9b148
(cherry picked from commit 8980958454ced6db001452e1f5f5811a944716d4)
diff --git a/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java b/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java
index 8616d58..1d0cfa5 100644
--- a/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java
+++ b/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java
@@ -289,6 +289,9 @@
}
private void updateLayerBounds(Rect bounds) {
+ if (bounds.isEmpty()) {
+ return;
+ }
try {
suspendChildInvalidation();
updateLayerBoundsInternal(bounds);
@@ -1109,4 +1112,4 @@
mCheckedStateful = false;
}
}
-}
\ No newline at end of file
+}