mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
HACK: Getting rid of all apps button / all apps from AppsCustomizePagedView
Change-Id: I74e4a53e9486237ad246ebdfa9e97c6ed9475b58
This commit is contained in:
@@ -129,7 +129,12 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
@Override
|
||||
public boolean acceptDrop(DragObject d) {
|
||||
// We can remove everything including App shortcuts, folders, widgets, etc.
|
||||
return true;
|
||||
if ((d.dragInfo instanceof LauncherAppWidgetInfo) ||
|
||||
(d.dragInfo instanceof PendingAddWidgetInfo)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -144,13 +149,12 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
|
||||
// If we are dragging an application from AppsCustomize, only show the control if we can
|
||||
// delete the app (it was downloaded), and rename the string to "uninstall" in such a case
|
||||
if (isAllAppsApplication(source, info)) {
|
||||
ApplicationInfo appInfo = (ApplicationInfo) info;
|
||||
if ((appInfo.flags & ApplicationInfo.DOWNLOADED_FLAG) != 0) {
|
||||
isUninstall = true;
|
||||
} else {
|
||||
isVisible = false;
|
||||
}
|
||||
|
||||
if ((info instanceof LauncherAppWidgetInfo) ||
|
||||
(info instanceof PendingAddWidgetInfo)) {
|
||||
isVisible = true;
|
||||
} else {
|
||||
isVisible = false;
|
||||
}
|
||||
|
||||
if (isUninstall) {
|
||||
|
||||
Reference in New Issue
Block a user