Generalize support for 'App Info', 'Uninstall' and 'Delete'
This allows other DragSource's to allow this behaviour, instead of it being
tied to specific source types.
Change-Id: I06b7c39b1b34a0ae141245bcc13b6a0873a4c0fd
diff --git a/src/com/android/launcher3/InfoDropTarget.java b/src/com/android/launcher3/InfoDropTarget.java
index 2ad43b6..374238c 100644
--- a/src/com/android/launcher3/InfoDropTarget.java
+++ b/src/com/android/launcher3/InfoDropTarget.java
@@ -62,10 +62,6 @@
}
}
- private boolean isFromAllApps(DragSource source) {
- return (source instanceof AppsCustomizePagedView);
- }
-
@Override
public boolean acceptDrop(DragObject d) {
// acceptDrop is called just before onDrop. We do the work here, rather than
@@ -93,7 +89,7 @@
boolean isVisible = true;
// Hide this button unless we are dragging something from AllApps
- if (!isFromAllApps(source)) {
+ if (!source.supportsAppInfoDropTarget()) {
isVisible = false;
}