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

Commit 7aaa841c authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing 'Item removed' announced twice when using accessible DnD

Change-Id: I2d8781155619d22a41c3f363be7909d411c62fa9
parent e78e3d73
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -303,14 +303,10 @@ public abstract class ButtonDropTarget extends TextView
        setOnClickListener(enable ? this : null);
    }

    protected String getAccessibilityDropConfirmation() {
        return null;
    }

    @Override
    public void onClick(View v) {
        LauncherAppState.getInstance().getAccessibilityDelegate()
            .handleAccessibleDrop(this, null, getAccessibilityDropConfirmation());
            .handleAccessibleDrop(this, null, null);
    }

    public int getTextColor() {
+0 −5
Original line number Diff line number Diff line
@@ -125,9 +125,4 @@ public class DeleteDropTarget extends ButtonDropTarget {
        dragLayer.animateView(d.dragView, fling, duration, tInterpolator, onAnimationEndRunnable,
                DragLayer.ANIMATION_END_DISAPPEAR, null);
    }

    @Override
    protected String getAccessibilityDropConfirmation() {
        return getResources().getString(R.string.item_removed);
    }
}