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

Commit 746c6c36 authored by Tony Wickham's avatar Tony Wickham
Browse files

Handle null background or foreground when dragging adaptive icons

Bug: 64080513
Change-Id: I5e80e8a4b4a80ebd3bc052592283eee72d59c0e2
parent 4560d2f7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -239,8 +239,14 @@ public class DragView extends View {
                            (int) (-bounds.height() * AdaptiveIconDrawable.getExtraInsetFraction())
                    );
                    mBgSpringDrawable = adaptiveIcon.getBackground();
                    if (mBgSpringDrawable == null) {
                        mBgSpringDrawable = new ColorDrawable(Color.TRANSPARENT);
                    }
                    mBgSpringDrawable.setBounds(bounds);
                    mFgSpringDrawable = adaptiveIcon.getForeground();
                    if (mFgSpringDrawable == null) {
                        mFgSpringDrawable = new ColorDrawable(Color.TRANSPARENT);
                    }
                    mFgSpringDrawable.setBounds(bounds);

                    new Handler(Looper.getMainLooper()).post(new Runnable() {