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

Commit fe9da818 authored by Adam Cohen's avatar Adam Cohen
Browse files

Fix for issue 16736964

Change-Id: If150db98346fe10f62fc1160309b66d7a19e9022
parent f07af7b7
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -129,11 +129,15 @@ public class DeleteDropTarget extends ButtonDropTarget {
    }

    private void setHoverColor() {
        if (mCurrentDrawable != null) {
            mCurrentDrawable.startTransition(mTransitionDuration);
        }
        setTextColor(mHoverColor);
    }
    private void resetHoverColor() {
        if (mCurrentDrawable != null) {
            mCurrentDrawable.resetTransition();
        }
        setTextColor(mOriginalTextColor);
    }

@@ -242,8 +246,11 @@ public class DeleteDropTarget extends ButtonDropTarget {
        final DragLayer dragLayer = mLauncher.getDragLayer();
        final Rect from = new Rect();
        dragLayer.getViewRectRelativeToSelf(d.dragView, from);

        int width = mCurrentDrawable == null ? 0 : mCurrentDrawable.getIntrinsicWidth();
        int height = mCurrentDrawable == null ? 0 : mCurrentDrawable.getIntrinsicHeight();
        final Rect to = getIconRect(d.dragView.getMeasuredWidth(), d.dragView.getMeasuredHeight(),
                mCurrentDrawable.getIntrinsicWidth(), mCurrentDrawable.getIntrinsicHeight());
                width, height);
        final float scale = (float) to.width() / from.width();

        mSearchDropTargetBar.deferOnDragEnd();
@@ -364,8 +371,11 @@ public class DeleteDropTarget extends ButtonDropTarget {
     */
    private AnimatorUpdateListener createFlingToTrashAnimatorListener(final DragLayer dragLayer,
            DragObject d, PointF vel, ViewConfiguration config) {

        int width = mCurrentDrawable == null ? 0 : mCurrentDrawable.getIntrinsicWidth();
        int height = mCurrentDrawable == null ? 0 : mCurrentDrawable.getIntrinsicHeight();
        final Rect to = getIconRect(d.dragView.getMeasuredWidth(), d.dragView.getMeasuredHeight(),
                mCurrentDrawable.getIntrinsicWidth(), mCurrentDrawable.getIntrinsicHeight());
                width, height);
        final Rect from = new Rect();
        dragLayer.getViewRectRelativeToSelf(d.dragView, from);