Merge changes from topic 'am-62871b14-7da8-4b31-b420-c5c87d1477d2' into ub-launcher3-master
* changes:
[automerger] Handle null background or foreground when dragging adaptive icons am: 746c6c36b6
Handle null background or foreground when dragging adaptive icons
This commit is contained in:
@@ -242,8 +242,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