mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Adding support for hiding widgets from the widget tray and reconfiguring widgets
> Removing AppInfo target > Switching between uninstall and setup based on the drag view Bug: 63931362 Change-Id: Iccd6f965fa3d61992244a365efc242122292c0ca
This commit is contained in:
@@ -24,6 +24,7 @@ import android.view.View;
|
||||
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
|
||||
import com.android.launcher3.dragndrop.DragOptions;
|
||||
import com.android.launcher3.folder.Folder;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.ControlType;
|
||||
|
||||
public class DeleteDropTarget extends ButtonDropTarget {
|
||||
|
||||
@@ -54,7 +55,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
* @return true for items that should have a "Remove" action in accessibility.
|
||||
*/
|
||||
@Override
|
||||
public boolean supportsAccessibilityDrop(ItemInfo info) {
|
||||
public boolean supportsAccessibilityDrop(ItemInfo info, View view) {
|
||||
return (info instanceof ShortcutInfo)
|
||||
|| (info instanceof LauncherAppWidgetInfo)
|
||||
|| (info instanceof FolderInfo);
|
||||
@@ -103,4 +104,9 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
mLauncher.getDragLayer()
|
||||
.announceForAccessibility(getContext().getString(R.string.item_removed));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getControlTypeForLogging() {
|
||||
return ControlType.REMOVE_TARGET;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user