Handle null background or foreground when dragging adaptive icons
Bug: 64080513 Change-Id: I5e80e8a4b4a80ebd3bc052592283eee72d59c0e2
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user