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
This commit is contained in:
Hyunyoung Song
2017-06-27 16:56:41 -07:00
parent bf15050a0c
commit dba9934fb7

View File

@@ -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;
}
}
}
}