Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3084ec2d authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Handle nullable drawables inside MaskableIconDrawable

Test: manual test
b/34902453

Change-Id: I36fc48f7e4c1f6503a9c26b8f239c62da729b490
parent 419fbce4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -726,6 +726,9 @@ public class MaskableIconDrawable extends Drawable implements Drawable.Callback
        int width = -1;
        for (int i = 0; i < mLayerState.N_CHILDREN; i++) {
            final ChildDrawable r = mLayerState.mChildren[i];
            if (r.mDrawable == null) {
                continue;
            }
            final int w = r.mDrawable.getIntrinsicWidth();
            if (w > width) {
                width = w;
@@ -743,6 +746,9 @@ public class MaskableIconDrawable extends Drawable implements Drawable.Callback
        int height = -1;
        for (int i = 0; i < mLayerState.N_CHILDREN; i++) {
            final ChildDrawable r = mLayerState.mChildren[i];
            if (r.mDrawable == null) {
                continue;
            }
            final int h = r.mDrawable.getIntrinsicHeight();
            if (h > height) {
                height = h;